[GTK][WAYLAND] Create WaylandCompositorDisplay unconditionally when initializing...
authormagomez@igalia.com <magomez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Jun 2017 12:29:03 +0000 (12:29 +0000)
committermagomez@igalia.com <magomez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Jun 2017 12:29:03 +0000 (12:29 +0000)
commitffedbf49e8522f44efb4b52d9d16556a630ea1c5
treeed5373576657110e4825018e2be49083a77c7221
parent66a522b27fbf2bad49dd91bf254b03cef380aab7
[GTK][WAYLAND] Create WaylandCompositorDisplay unconditionally when initializing the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=173598

Reviewed by Carlos Garcia Campos.

Move WaylandCompositorDisplay code to its own files so it can be used from other classes. Then, instead of
storing the waylandCompositorDisplayName in the WebProcess, keep a WaylandCompositorDisplay instance that
is created during the initialization. This way the appropriate sharedDisplayForCompositing will be set
since the creation of the WebProcess.

* PlatformGTK.cmake:
* WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp:
(WebKit::AcceleratedSurfaceWayland::create):
(WebKit::AcceleratedSurfaceWayland::AcceleratedSurfaceWayland):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::waylandCompositorDisplay):
* WebProcess/gtk/WaylandCompositorDisplay.cpp: Added.
(WebKit::WaylandCompositorDisplay::create):
(WebKit::WaylandCompositorDisplay::bindSurfaceToPage):
(WebKit::WaylandCompositorDisplay::WaylandCompositorDisplay):
(WebKit::WaylandCompositorDisplay::registryGlobal):
* WebProcess/gtk/WaylandCompositorDisplay.h: Added.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformGTK.cmake
Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h
Source/WebKit2/WebProcess/gtk/WaylandCompositorDisplay.cpp [new file with mode: 0644]
Source/WebKit2/WebProcess/gtk/WaylandCompositorDisplay.h [new file with mode: 0644]
Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp