[chromium] Switch to new webkit_support::CreateLayerTreeView interface
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Mar 2013 02:34:27 +0000 (02:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Mar 2013 02:34:27 +0000 (02:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=111285

Patch by James Robinson <jamesr@chromium.org> on 2013-03-04
Reviewed by Adrienne Walker.

This removes the need for WebCompositorSupport::initialize and exposes
slightly fewer entry points across the repository boundary.

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::initialize):
* DumpRenderTree/chromium/TestShell.h:
(TestShell::webCompositorThread):
(TestShell):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::initializeLayerTreeView):

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

Tools/ChangeLog
Tools/DumpRenderTree/chromium/TestShell.cpp
Tools/DumpRenderTree/chromium/TestShell.h
Tools/DumpRenderTree/chromium/WebViewHost.cpp

index a99e0af..85e7c5a 100644 (file)
@@ -1,3 +1,21 @@
+2013-03-04  James Robinson  <jamesr@chromium.org>
+
+        [chromium] Switch to new webkit_support::CreateLayerTreeView interface
+        https://bugs.webkit.org/show_bug.cgi?id=111285
+
+        Reviewed by Adrienne Walker.
+
+        This removes the need for WebCompositorSupport::initialize and exposes
+        slightly fewer entry points across the repository boundary.
+
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::initialize):
+        * DumpRenderTree/chromium/TestShell.h:
+        (TestShell::webCompositorThread):
+        (TestShell):
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::initializeLayerTreeView):
+
 2013-03-04  Roger Fong  <roger_fong@apple.com>
 
         Unreviewed. Get rid of some AppleWin VS2010 build warnings.
index 82dc584..3137df5 100644 (file)
@@ -145,7 +145,6 @@ void TestShell::initialize(MockPlatform* platformSupport)
 
     if (m_threadedCompositingEnabled)
         m_webCompositorThread = adoptPtr(WebKit::Platform::current()->createThread("Compositor"));
-    WebKit::Platform::current()->compositorSupport()->initialize(m_webCompositorThread.get());
 
     createMainWindow();
 }
index 67506ad..02da1fc 100644 (file)
@@ -175,6 +175,8 @@ public:
     typedef Vector<WebViewHost*> WindowList;
     WindowList windowList() const { return m_windowList; }
 
+    WebKit::WebThread* webCompositorThread() const { return m_webCompositorThread.get(); }
+
 private:
     WebViewHost* createNewWindow(const WebKit::WebURL&, DRTDevToolsAgent*, WebTestRunner::WebTestInterfaces*);
     void createMainWindow();
index 6905cda..e1c4abd 100644 (file)
@@ -278,10 +278,17 @@ private:
 void WebViewHost::initializeLayerTreeView(WebLayerTreeViewClient* client, const WebLayer& rootLayer, const WebLayerTreeView::Settings& settings)
 {
     m_layerTreeViewClient = adoptPtr(new WebViewHostDRTLayerTreeViewClient(this));
-    if (m_shell->softwareCompositingEnabled())
-        m_layerTreeView = adoptPtr(webkit_support::CreateLayerTreeViewSoftware(m_layerTreeViewClient.get()));
-    else
-        m_layerTreeView = adoptPtr(webkit_support::CreateLayerTreeView3d(m_layerTreeViewClient.get()));
+    if (m_shell->softwareCompositingEnabled()) {
+        m_layerTreeView = adoptPtr(webkit_support::CreateLayerTreeView(
+            webkit_support::SOFTWARE_CONTEXT,
+            m_layerTreeViewClient.get(),
+            m_shell->webCompositorThread()));
+    } else {
+        m_layerTreeView = adoptPtr(webkit_support::CreateLayerTreeView(
+            webkit_support::MESA_CONTEXT,
+            m_layerTreeViewClient.get(),
+            m_shell->webCompositorThread()));
+    }
 
     ASSERT(m_layerTreeView);
     updateViewportSize();