[WPE] Switch ViewBackend to using wpe_view_backend_exportable_fdo_egl APIs
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jul 2018 13:26:05 +0000 (13:26 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jul 2018 13:26:05 +0000 (13:26 +0000)
commit4e80cf64b6f9a2c81b6d04557b00c0373bbd73b3
tree20bc6a1bdc979c68166063ef72c83d20b6ef971d
parent783006099ea3561eaeb1f756b236d9f6455aae21
[WPE] Switch ViewBackend to using wpe_view_backend_exportable_fdo_egl APIs
https://bugs.webkit.org/show_bug.cgi?id=187997

Reviewed by Carlos Garcia Campos.

Instead of the raw wpe_view_backend_exportable_fdo API, switch to using
the EGL-oriented API that simply serves EGLImageKHR objects instead of
raw buffer resources. This allows us not to wrangle with creating and
managing lifetime of the same EGLImageKHR by ourselves.

ViewBackend now defines a wpe_view_backend_exportable_fdo_egl_client
struct and uses wpe_view_backend_exportable_fdo_egl_create() to create
the exportable object. This means that for each frame we're served an
EGLImageKHR object that is passed on to the displayBuffer()
implementation.

HeadlessViewBackend now just manages the pending and committed image
objects. Width and height values used during pixel data retrieval are
gathered from the ViewBackend's size that was specified when
constructed.

WindowViewBackend similarly only manages the committed image object,
not having to create an equivalent EGLImageKHR object from the raw
buffer resource anymore.

Unused EGL entrypoints in both HeadlessViewBackend and WindowViewBackend
classes are removed, and destructors for both classes are made virtual.

The WPEBackend-fdo version is bumped in order to have the EGL-specific
export API available.

* flatpak/org.webkit.WPE.yaml:
* wpe/backends/HeadlessViewBackend.cpp:
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::createSnapshot):
(WPEToolingBackends::HeadlessViewBackend::performUpdate):
(WPEToolingBackends::HeadlessViewBackend::displayBuffer):
* wpe/backends/HeadlessViewBackend.h:
* wpe/backends/ViewBackend.cpp:
(WPEToolingBackends::ViewBackend::initialize):
* wpe/backends/ViewBackend.h:
* wpe/backends/WindowViewBackend.cpp:
(WPEToolingBackends::WindowViewBackend::WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::~WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::displayBuffer):
* wpe/backends/WindowViewBackend.h:
* wpe/jhbuild.modules:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/flatpak/org.webkit.WPE.yaml
Tools/wpe/backends/HeadlessViewBackend.cpp
Tools/wpe/backends/HeadlessViewBackend.h
Tools/wpe/backends/ViewBackend.cpp
Tools/wpe/backends/ViewBackend.h
Tools/wpe/backends/WindowViewBackend.cpp
Tools/wpe/backends/WindowViewBackend.h
Tools/wpe/jhbuild.modules