[WK2] [GTK] Remove the test to disable AC under Wayland from WebKitWebViewGroup
authorberto@igalia.com <berto@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Sep 2013 17:10:13 +0000 (17:10 +0000)
committerberto@igalia.com <berto@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Sep 2013 17:10:13 +0000 (17:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=120762

Reviewed by Gustavo Noronha Silva.

The code to disable AC under Wayland is not run if we're using
WebKitTestRunner, so it would be better to move it to
WebKitWebViewBase.

However it's not really necessary to do that, instead it's much
simpler to disable accelerated compositing in all cases unless we
know we can support it.

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

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

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

index e3f3f78..04b6b42 100644 (file)
@@ -1,3 +1,23 @@
+2013-09-05  Alberto Garcia  <berto@igalia.com>
+
+        [WK2] [GTK] Remove the test to disable AC under Wayland from WebKitWebViewGroup
+        https://bugs.webkit.org/show_bug.cgi?id=120762
+
+        Reviewed by Gustavo Noronha Silva.
+
+        The code to disable AC under Wayland is not run if we're using
+        WebKitTestRunner, so it would be better to move it to
+        WebKitWebViewBase.
+
+        However it's not really necessary to do that, instead it's much
+        simpler to disable accelerated compositing in all cases unless we
+        know we can support it.
+
+        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+        (webkitWebViewBaseUpdatePreferences):
+        * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
+        (webkitWebViewGroupAttachSettingsToPageGroup):
+
 2013-09-04  Alberto Garcia  <berto@igalia.com>
 
         [WK2][GTK] ASSERTION in WebKit::LayerTreeHostGtk::invalidate
index bdc8d5f..1b6b940 100644 (file)
@@ -896,12 +896,14 @@ WebPageProxy* webkitWebViewBaseGetPage(WebKitWebViewBase* webkitWebViewBase)
 
 void webkitWebViewBaseUpdatePreferences(WebKitWebViewBase* webkitWebViewBase)
 {
-#if USE(TEXTURE_MAPPER_GL)
     WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
 
-    if (!priv->redirectedWindow)
-        priv->pageProxy->pageGroup()->preferences()->setAcceleratedCompositingEnabled(false);
+#if USE(TEXTURE_MAPPER_GL)
+    if (priv->redirectedWindow)
+        return;
 #endif
+
+    priv->pageProxy->pageGroup()->preferences()->setAcceleratedCompositingEnabled(false);
 }
 
 void webkitWebViewBaseCreateWebPage(WebKitWebViewBase* webkitWebViewBase, WebContext* context, WebPageGroup* pageGroup)
index 229c5bb..998c5c0 100644 (file)
 #include <wtf/gobject/GRefPtr.h>
 #include <wtf/text/CString.h>
 
-#ifdef GDK_WINDOWING_WAYLAND
-#include <gdk/gdkwayland.h>
-#endif
-
 using namespace WebKit;
 
 /**
@@ -130,12 +126,6 @@ static void webkit_web_view_group_class_init(WebKitWebViewGroupClass* hitTestRes
 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)