Title: [131944] trunk
Revision
131944
Author
[email protected]
Date
2012-10-19 14:30:19 -0700 (Fri, 19 Oct 2012)

Log Message

[chromium] API to pass impl thread via WebLayerTreeView
https://bugs.webkit.org/show_bug.cgi?id=99863

Reviewed by James Robinson.

This adds an API to pass the compositor impl thread via WebView and
WebLayerTreeView. This is currently a no-op change, but in the future
this codepath will supercede WebCompositor. The goal is to avoid statics
in compositor initialization.

Source/Platform:

* chromium/public/WebCompositorSupport.h:
(WebKit::WebCompositorSupport::createLayerTreeView):
(WebCompositorSupport):
* chromium/public/WebLayerTreeView.h:
(WebKit):
(WebLayerTreeView):

Source/WebKit/chromium:

* public/WebView.h:
(WebKit):
(WebView):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::setCompositorImplThread):
(WebKit):
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
* src/WebViewImpl.h:
(WebViewImpl):
* tests/GraphicsLayerChromiumTest.cpp:
(WebKit::GraphicsLayerChromiumTest::GraphicsLayerChromiumTest):

Tools:

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::createNewWindow):

Modified Paths

Diff

Modified: trunk/Source/Platform/ChangeLog (131943 => 131944)


--- trunk/Source/Platform/ChangeLog	2012-10-19 21:04:06 UTC (rev 131943)
+++ trunk/Source/Platform/ChangeLog	2012-10-19 21:30:19 UTC (rev 131944)
@@ -1,3 +1,22 @@
+2012-10-19  Alexandre Elias  <[email protected]>
+
+        [chromium] API to pass impl thread via WebLayerTreeView
+        https://bugs.webkit.org/show_bug.cgi?id=99863
+
+        Reviewed by James Robinson.
+
+        This adds an API to pass the compositor impl thread via WebView and
+        WebLayerTreeView. This is currently a no-op change, but in the future
+        this codepath will supercede WebCompositor. The goal is to avoid statics
+        in compositor initialization.
+
+        * chromium/public/WebCompositorSupport.h:
+        (WebKit::WebCompositorSupport::createLayerTreeView):
+        (WebCompositorSupport):
+        * chromium/public/WebLayerTreeView.h:
+        (WebKit):
+        (WebLayerTreeView):
+
 2012-10-18  Tommy Widenflycht  <[email protected]>
 
         MediaStream API: Do some cleanup in the chromium WebKit API

Modified: trunk/Source/Platform/chromium/public/WebCompositorSupport.h (131943 => 131944)


--- trunk/Source/Platform/chromium/public/WebCompositorSupport.h	2012-10-19 21:04:06 UTC (rev 131943)
+++ trunk/Source/Platform/chromium/public/WebCompositorSupport.h	2012-10-19 21:30:19 UTC (rev 131944)
@@ -74,6 +74,8 @@
     virtual void setPageScalePinchZoomEnabled(bool) { }
 
     // May return 0 if initialization fails.
+    virtual WebLayerTreeView* createLayerTreeView(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings, WebThread* implThread) { return createLayerTreeView(client, root, settings); }
+    // FIXME(aelias): Delete this version when the above is implemented.
     virtual WebLayerTreeView* createLayerTreeView(WebLayerTreeViewClient*, const WebLayer& root, const WebLayerTreeView::Settings&) { return 0; }
 
 

Modified: trunk/Source/WebKit/chromium/ChangeLog (131943 => 131944)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-10-19 21:04:06 UTC (rev 131943)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-10-19 21:30:19 UTC (rev 131944)
@@ -1,3 +1,28 @@
+2012-10-19  Alexandre Elias  <[email protected]>
+
+        [chromium] API to pass impl thread via WebLayerTreeView
+        https://bugs.webkit.org/show_bug.cgi?id=99863
+
+        Reviewed by James Robinson.
+
+        This adds an API to pass the compositor impl thread via WebView and
+        WebLayerTreeView. This is currently a no-op change, but in the future
+        this codepath will supercede WebCompositor. The goal is to avoid statics
+        in compositor initialization.
+
+        * public/WebView.h:
+        (WebKit):
+        (WebView):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::WebViewImpl):
+        (WebKit::WebViewImpl::setCompositorImplThread):
+        (WebKit):
+        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+        * src/WebViewImpl.h:
+        (WebViewImpl):
+        * tests/GraphicsLayerChromiumTest.cpp:
+        (WebKit::GraphicsLayerChromiumTest::GraphicsLayerChromiumTest):
+
 2012-10-19  Pavel Feldman  <[email protected]>
 
         Web Inspector: merge "docked" state into the "dock side" enum.

Modified: trunk/Source/WebKit/chromium/public/WebView.h (131943 => 131944)


--- trunk/Source/WebKit/chromium/public/WebView.h	2012-10-19 21:04:06 UTC (rev 131943)
+++ trunk/Source/WebKit/chromium/public/WebView.h	2012-10-19 21:30:19 UTC (rev 131944)
@@ -58,6 +58,7 @@
 class WebSpellCheckClient;
 class WebString;
 class WebTextFieldDecoratorClient;
+class WebThread;
 class WebViewClient;
 struct WebActiveWheelFlingParameters;
 struct WebMediaPlayerAction;
@@ -467,6 +468,8 @@
 
     virtual bool isSelectionEditable() const = 0;
 
+    virtual void setCompositorImplThread(WebThread*) = 0;
+
     // Benchmarking support -------------------------------------------------
 
     virtual WebViewBenchmarkSupport* benchmarkSupport() { return 0; }

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (131943 => 131944)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-10-19 21:04:06 UTC (rev 131943)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-10-19 21:30:19 UTC (rev 131944)
@@ -424,6 +424,7 @@
     , m_compositorSurfaceReady(false)
     , m_deviceScaleInCompositor(1)
     , m_inputHandlerIdentifier(-1)
+    , m_compositorImplThread(0)
 #endif
 #if ENABLE(INPUT_SPEECH)
     , m_speechInputClient(SpeechInputClientImpl::create(client))
@@ -3871,6 +3872,11 @@
     setBackgroundColor(view->documentBackgroundColor());
 }
 
+void WebViewImpl::setCompositorImplThread(WebThread* compositorImplThread)
+{
+    m_compositorImplThread = compositorImplThread;
+}
+
 void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
 {
     WebKit::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompositingActive", active * 2 + m_isAcceleratedCompositingActive, 4);
@@ -3908,7 +3914,7 @@
         m_nonCompositedContentHost->setShowDebugBorders(page()->settings()->showDebugBorders());
         m_nonCompositedContentHost->setOpaque(!isTransparent());
 
-        m_layerTreeView = adoptPtr(Platform::current()->compositorSupport()->createLayerTreeView(this, *m_rootLayer, layerTreeViewSettings));
+        m_layerTreeView = adoptPtr(Platform::current()->compositorSupport()->createLayerTreeView(this, *m_rootLayer, layerTreeViewSettings, m_compositorImplThread));
         if (m_layerTreeView) {
             if (m_webSettings->applyDefaultDeviceScaleFactorInCompositor() && page()->deviceScaleFactor() != 1) {
                 ASSERT(page()->deviceScaleFactor());

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (131943 => 131944)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-10-19 21:04:06 UTC (rev 131943)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-10-19 21:30:19 UTC (rev 131944)
@@ -202,6 +202,7 @@
     virtual bool isActive() const;
     virtual void setIsActive(bool value);
     virtual void setDomainRelaxationForbidden(bool, const WebString& scheme);
+    virtual void setCompositorImplThread(WebThread*);
     virtual bool dispatchBeforeUnloadEvent();
     virtual void dispatchUnloadEvent();
     virtual WebFrame* mainFrame();
@@ -840,6 +841,7 @@
     bool m_compositorSurfaceReady;
     float m_deviceScaleInCompositor;
     int m_inputHandlerIdentifier;
+    WebThread* m_compositorImplThread;
 #endif
     static const WebInputEvent* m_currentInputEvent;
 

Modified: trunk/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp (131943 => 131944)


--- trunk/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp	2012-10-19 21:04:06 UTC (rev 131943)
+++ trunk/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp	2012-10-19 21:30:19 UTC (rev 131944)
@@ -66,7 +66,7 @@
         Platform::current()->compositorSupport()->initialize(0);
         m_graphicsLayer = static_pointer_cast<GraphicsLayerChromium>(GraphicsLayer::create(&m_client));
         m_platformLayer = m_graphicsLayer->platformLayer();
-        m_layerTreeView = adoptPtr(Platform::current()->compositorSupport()->createLayerTreeView(&m_layerTreeViewClient, *m_platformLayer, WebLayerTreeView::Settings()));
+        m_layerTreeView = adoptPtr(Platform::current()->compositorSupport()->createLayerTreeView(&m_layerTreeViewClient, *m_platformLayer, WebLayerTreeView::Settings(), 0));
         m_layerTreeView->setViewportSize(WebSize(1, 1), WebSize(1, 1));
     }
 

Modified: trunk/Tools/ChangeLog (131943 => 131944)


--- trunk/Tools/ChangeLog	2012-10-19 21:04:06 UTC (rev 131943)
+++ trunk/Tools/ChangeLog	2012-10-19 21:30:19 UTC (rev 131944)
@@ -1,3 +1,18 @@
+2012-10-19  Alexandre Elias  <[email protected]>
+
+        [chromium] API to pass impl thread via WebLayerTreeView
+        https://bugs.webkit.org/show_bug.cgi?id=99863
+
+        Reviewed by James Robinson.
+
+        This adds an API to pass the compositor impl thread via WebView and
+        WebLayerTreeView. This is currently a no-op change, but in the future
+        this codepath will supercede WebCompositor. The goal is to avoid statics
+        in compositor initialization.
+
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::createNewWindow):
+
 2012-10-19  Raphael Kubo da Costa  <[email protected]>
 
         [Cairo][WTR] Implement the painting of repaint rectangles.

Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.cpp (131943 => 131944)


--- trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2012-10-19 21:04:06 UTC (rev 131943)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2012-10-19 21:30:19 UTC (rev 131944)
@@ -741,6 +741,7 @@
 {
     WebViewHost* host = new WebViewHost(this);
     WebView* view = WebView::create(host);
+    view->setCompositorImplThread(m_webCompositorThread.get());
     view->setPermissionClient(webPermissions());
     view->setDevToolsAgentClient(devToolsAgent);
     host->setWebWidget(view);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to