Title: [135401] trunk/Source/WebKit2
Revision
135401
Author
commit-qu...@webkit.org
Date
2012-11-21 07:11:45 -0800 (Wed, 21 Nov 2012)

Log Message

Coordinated Graphics: refactor LayerTreeRenderer::syncRemoteContent().
https://bugs.webkit.org/show_bug.cgi?id=102900

Patch by Huang Dongsung <luxte...@company100.net> on 2012-11-21
Reviewed by Noam Rosenthal.

Currently, QQuickWebPage::updatePaintNode() calls
LayerTreeRenderer::syncRemoteContent() with locking the main thread.
syncRemoteContent() is heavy, so we should not call syncRemoteContent() in
updatePaintNode(). Calling syncRemoteContent() in the painting thread is
thread-safe because syncRemoteContent() does not access any data
structures, which the main thread use.

After this patch, syncRemoteContent() is used only internally, so
syncRemoteContent() becomes private.

* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::displayTimerFired):
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::updatePaintNode):
* UIProcess/API/qt/raw/qrawwebview.cpp:
(QRawWebView::paint):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::paintToCurrentGLContext):
(WebKit::LayerTreeRenderer::ensureRootLayer):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(LayerTreeRenderer):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (135400 => 135401)


--- trunk/Source/WebKit2/ChangeLog	2012-11-21 15:10:25 UTC (rev 135400)
+++ trunk/Source/WebKit2/ChangeLog	2012-11-21 15:11:45 UTC (rev 135401)
@@ -1,3 +1,32 @@
+2012-11-21  Huang Dongsung  <luxte...@company100.net>
+
+        Coordinated Graphics: refactor LayerTreeRenderer::syncRemoteContent().
+        https://bugs.webkit.org/show_bug.cgi?id=102900
+
+        Reviewed by Noam Rosenthal.
+
+        Currently, QQuickWebPage::updatePaintNode() calls
+        LayerTreeRenderer::syncRemoteContent() with locking the main thread.
+        syncRemoteContent() is heavy, so we should not call syncRemoteContent() in
+        updatePaintNode(). Calling syncRemoteContent() in the painting thread is
+        thread-safe because syncRemoteContent() does not access any data
+        structures, which the main thread use.
+
+        After this patch, syncRemoteContent() is used only internally, so
+        syncRemoteContent() becomes private.
+
+        * UIProcess/API/efl/EwkViewImpl.cpp:
+        (EwkViewImpl::displayTimerFired):
+        * UIProcess/API/qt/qquickwebpage.cpp:
+        (QQuickWebPage::updatePaintNode):
+        * UIProcess/API/qt/raw/qrawwebview.cpp:
+        (QRawWebView::paint):
+        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
+        (WebKit::LayerTreeRenderer::paintToCurrentGLContext):
+        (WebKit::LayerTreeRenderer::ensureRootLayer):
+        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
+        (LayerTreeRenderer):
+
 2012-11-21  Andras Becsi  <andras.be...@digia.com>
 
         [WK2] Viewport meta tag broken after r134801

Modified: trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp (135400 => 135401)


--- trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp	2012-11-21 15:10:25 UTC (rev 135400)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp	2012-11-21 15:11:45 UTC (rev 135401)
@@ -362,7 +362,6 @@
 
     renderer->setActive(true);
     renderer->setDrawsBackground(m_setDrawsBackground);
-    renderer->syncRemoteContent();
     if (m_isHardwareAccelerated) {
         renderer->paintToCurrentGLContext(transformToScene().toTransformationMatrix(), /* opacity */ 1, viewport);
         // sd->image is tied to a native surface. The native surface is in the parent's coordinates,

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp (135400 => 135401)


--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp	2012-11-21 15:10:25 UTC (rev 135400)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp	2012-11-21 15:11:45 UTC (rev 135401)
@@ -87,7 +87,6 @@
     if (!node)
         node = new QtWebPageSGNode();
     node->setRenderer(renderer);
-    renderer->syncRemoteContent();
 
     node->setScale(d->contentsScale);
     QColor backgroundColor = d->webPageProxy->drawsTransparentBackground() ? Qt::transparent : Qt::white;

Modified: trunk/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp (135400 => 135401)


--- trunk/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp	2012-11-21 15:10:25 UTC (rev 135400)
+++ trunk/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp	2012-11-21 15:11:45 UTC (rev 135401)
@@ -376,7 +376,6 @@
         return;
 
     renderer->setActive(true);
-    renderer->syncRemoteContent();
 
     WebCore::FloatRect rect(0, 0, d->m_size.width(), d->m_size.height());
 

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp (135400 => 135401)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp	2012-11-21 15:10:25 UTC (rev 135400)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp	2012-11-21 15:11:45 UTC (rev 135401)
@@ -122,6 +122,7 @@
     if (!m_textureMapper)
         m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode);
     ASSERT(m_textureMapper->accelerationMode() == TextureMapper::OpenGLMode);
+    syncRemoteContent();
 
     adjustPositionForFixedLayers();
     GraphicsLayer* currentRootLayer = rootLayer();
@@ -580,10 +581,6 @@
 {
     if (m_rootLayer)
         return;
-    if (!m_textureMapper) {
-        m_textureMapper = TextureMapper::create(m_accelerationMode);
-        static_cast<TextureMapperGL*>(m_textureMapper.get())->setEnableEdgeDistanceAntialiasing(true);
-    }
 
     m_rootLayer = createLayer(InvalidWebLayerID);
     m_rootLayer->setMasksToBounds(false);
@@ -592,6 +589,8 @@
 
     // The root layer should not have zero size, or it would be optimized out.
     m_rootLayer->setSize(FloatSize(1.0, 1.0));
+
+    ASSERT(m_textureMapper);
     toTextureMapperLayer(m_rootLayer.get())->setTextureMapper(m_textureMapper.get());
 }
 

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h (135400 => 135401)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h	2012-11-21 15:10:25 UTC (rev 135400)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h	2012-11-21 15:11:45 UTC (rev 135401)
@@ -70,7 +70,6 @@
     void purgeGLResources();
     void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&, WebCore::TextureMapper::PaintFlags = 0);
     void paintToGraphicsContext(BackingStore::PlatformGraphicsContext);
-    void syncRemoteContent();
     void setContentsSize(const WebCore::FloatSize&);
     void setVisibleContentsRect(const WebCore::FloatRect&);
     void didChangeScrollPosition(const WebCore::IntPoint& position);
@@ -127,6 +126,8 @@
     WebCore::GraphicsLayer* layerByID(WebLayerID id) { return (id == InvalidWebLayerID) ? 0 : m_layers.get(id); }
     WebCore::GraphicsLayer* rootLayer() { return m_rootLayer.get(); }
 
+    void syncRemoteContent();
+
     // Reimplementations from WebCore::GraphicsLayerClient.
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double) { }
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) { }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to