Title: [154728] trunk/Source/WebKit2
Revision
154728
Author
[email protected]
Date
2013-08-28 02:34:50 -0700 (Wed, 28 Aug 2013)

Log Message

[GTK][WK2] Disable accelerated compositing under Wayland
https://bugs.webkit.org/show_bug.cgi?id=120347

Reviewed by Martin Robinson.

Accelerated compositing is not yet supported under the Wayland display protocol,
so it should be disabled. Since it is enabled by default and the GTK WK2 API does
not provide any way to change that, it's enough to disable it when attaching the
WebKitSettings object to the WebPageGroup if running under Wayland.

* UIProcess/API/gtk/WebKitWebViewGroup.cpp:
(webkitWebViewGroupAttachSettingsToPageGroup):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (154727 => 154728)


--- trunk/Source/WebKit2/ChangeLog	2013-08-28 09:29:30 UTC (rev 154727)
+++ trunk/Source/WebKit2/ChangeLog	2013-08-28 09:34:50 UTC (rev 154728)
@@ -1,3 +1,18 @@
+2013-08-28  Zan Dobersek  <[email protected]>
+
+        [GTK][WK2] Disable accelerated compositing under Wayland
+        https://bugs.webkit.org/show_bug.cgi?id=120347
+
+        Reviewed by Martin Robinson.
+
+        Accelerated compositing is not yet supported under the Wayland display protocol,
+        so it should be disabled. Since it is enabled by default and the GTK WK2 API does
+        not provide any way to change that, it's enough to disable it when attaching the
+        WebKitSettings object to the WebPageGroup if running under Wayland.
+
+        * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
+        (webkitWebViewGroupAttachSettingsToPageGroup):
+
 2013-08-28  Alexandre Abreu  <[email protected]>
 
         Add a 'isMainFrame' parameter to QWebNavigationRequest.

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroup.cpp (154727 => 154728)


--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroup.cpp	2013-08-28 09:29:30 UTC (rev 154727)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGroup.cpp	2013-08-28 09:34:50 UTC (rev 154728)
@@ -28,6 +28,10 @@
 #include <wtf/gobject/GRefPtr.h>
 #include <wtf/text/CString.h>
 
+#ifdef GDK_WINDOWING_WAYLAND
+#include <gdk/gdkwayland.h>
+#endif
+
 using namespace WebKit;
 
 /**
@@ -126,6 +130,12 @@
 static void webkitWebViewGroupAttachSettingsToPageGroup(WebKitWebViewGroup* group)
 {
     group->priv->pageGroup->setPreferences(webkitSettingsGetPreferences(group->priv->settings.get()));
+
+#ifdef GDK_WINDOWING_WAYLAND
+    GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get());
+    if (GDK_IS_WAYLAND_DISPLAY(display))
+        group->priv->pageGroup->preferences()->setAcceleratedCompositingEnabled(false);
+#endif
 }
 
 WebKitWebViewGroup* webkitWebViewGroupCreate(WebPageGroup* pageGroup)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to