[GTK] Disable accelerated compositing on Wayland
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Mar 2015 10:38:19 +0000 (10:38 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Mar 2015 10:38:19 +0000 (10:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142877

Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage): As was done in the past, we should disable
accelerated compositing on Wayland until the proper support for it lands.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181798 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp

index 5a2bb5c..e5cf18a 100644 (file)
@@ -1,3 +1,14 @@
+2015-03-20  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GTK] Disable accelerated compositing on Wayland
+        https://bugs.webkit.org/show_bug.cgi?id=142877
+
+        Reviewed by Carlos Garcia Campos.
+
+        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+        (webkitWebViewBaseCreateWebPage): As was done in the past, we should disable
+        accelerated compositing on Wayland until the proper support for it lands.
+
 2015-03-19  Andy Estes  <aestes@apple.com>
 
         [Content Filtering] Add tests for unblock requests
index 0c8bc94..38ba498 100644 (file)
@@ -58,9 +58,6 @@
 #include <WebCore/Region.h>
 #include <gdk/gdk.h>
 #include <gdk/gdkkeysyms.h>
-#if defined(GDK_WINDOWING_X11)
-#include <gdk/gdkx.h>
-#endif
 #include <memory>
 #include <wtf/HashMap.h>
 #include <wtf/gobject/GRefPtr.h>
 #include "WebFullScreenManagerProxy.h"
 #endif
 
+#if PLATFORM(X11)
+#include <gdk/gdkx.h>
+#endif
+#if PLATFORM(WAYLAND)
+#include <gdk/gdkwayland.h>
+#endif
+
 // gtk_widget_get_scale_factor() appeared in GTK 3.10, but we also need
 // to make sure we have cairo new enough to support cairo_surface_set_device_scale
 #define HAVE_GTK_SCALE_FACTOR HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE && GTK_CHECK_VERSION(3, 10, 0)
@@ -1115,6 +1119,14 @@ void webkitWebViewBaseCreateWebPage(WebKitWebViewBase* webkitWebViewBase, WebPro
 {
     WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
 
+#if PLATFORM(WAYLAND)
+    // FIXME: Accelerated compositing under Wayland is not yet supported.
+    // https://bugs.webkit.org/show_bug.cgi?id=115803
+    GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get());
+    if (GDK_IS_WAYLAND_DISPLAY(display))
+        preferences->setAcceleratedCompositingEnabled(false);
+#endif
+
     WebPageConfiguration webPageConfiguration;
     webPageConfiguration.preferences = preferences;
     webPageConfiguration.pageGroup = pageGroup;