Title: [109855] tags/Safari-536.2.1/Source

Diff

Modified: tags/Safari-536.2.1/Source/WebCore/ChangeLog (109854 => 109855)


--- tags/Safari-536.2.1/Source/WebCore/ChangeLog	2012-03-06 05:20:32 UTC (rev 109854)
+++ tags/Safari-536.2.1/Source/WebCore/ChangeLog	2012-03-06 05:23:04 UTC (rev 109855)
@@ -1,5 +1,25 @@
 2011-03-05  Lucas Forschler  <[email protected]>
 
+    Merge 109812
+
+    2012-03-05  Anders Carlsson  <[email protected]>
+
+            Be more aggressive about repainting page overlays
+            https://bugs.webkit.org/show_bug.cgi?id=80336
+            <rdar://problem/10965943>
+
+            Reviewed by Simon Fraser.
+
+            Add a way to find out if a given GraphicsLayer is going to be repainted.
+
+            * WebCore.exp.in:
+            * platform/graphics/GraphicsLayer.h:
+            (WebCore::GraphicsLayer::needsDisplay):
+            (GraphicsLayer):
+            * platform/graphics/ca/GraphicsLayerCA.h:
+
+2011-03-05  Lucas Forschler  <[email protected]>
+
     Merge 109801
 
     2012-03-05  Anders Carlsson  <[email protected]>

Modified: tags/Safari-536.2.1/Source/WebCore/WebCore.exp.in (109854 => 109855)


--- tags/Safari-536.2.1/Source/WebCore/WebCore.exp.in	2012-03-06 05:20:32 UTC (rev 109854)
+++ tags/Safari-536.2.1/Source/WebCore/WebCore.exp.in	2012-03-06 05:23:04 UTC (rev 109855)
@@ -143,6 +143,7 @@
 __ZN7WebCore10JSDocument6s_infoE
 __ZN7WebCore10MouseEvent6createERKN3WTF12AtomicStringENS1_10PassRefPtrINS_9DOMWindowEEERKNS_18PlatformMouseEventEiNS5_INS_4NodeEEE
 __ZN7WebCore10MouseEventC1ERKN3WTF12AtomicStringEbbNS1_10PassRefPtrINS_9DOMWindowEEEiiiiibbbbtNS5_INS_11EventTargetEEENS5_INS_9ClipboardEEEb
+__ZN7WebCore10RenderView10compositorEv
 __ZN7WebCore10ShadowTree20removeAllShadowRootsEv
 __ZN7WebCore10ScrollView17setUseFixedLayoutEb
 __ZN7WebCore10ScrollView18setFixedLayoutSizeERKNS_7IntSizeE
@@ -1347,6 +1348,8 @@
 __ZNK7WebCore21BackForwardController12forwardCountEv
 __ZNK7WebCore21BackForwardController9backCountEv
 __ZNK7WebCore21UserContentURLPattern7matchesERKNS_4KURLE
+__ZNK7WebCore21RenderLayerCompositor11scrollLayerEv
+__ZNK7WebCore21RenderLayerCompositor15rootRenderLayerEv
 __ZNK7WebCore23AuthenticationChallenge20authenticationClientEv
 __ZNK7WebCore23FrameLoaderStateMachine15firstLayoutDoneEv
 __ZNK7WebCore23FrameLoaderStateMachine23committingFirstRealLoadEv

Modified: tags/Safari-536.2.1/Source/WebCore/platform/graphics/GraphicsLayer.h (109854 => 109855)


--- tags/Safari-536.2.1/Source/WebCore/platform/graphics/GraphicsLayer.h	2012-03-06 05:20:32 UTC (rev 109854)
+++ tags/Safari-536.2.1/Source/WebCore/platform/graphics/GraphicsLayer.h	2012-03-06 05:23:04 UTC (rev 109855)
@@ -343,7 +343,8 @@
     virtual void setNeedsDisplay() = 0;
     // mark the given rect (in layer coords) as needing dispay. Never goes deep.
     virtual void setNeedsDisplayInRect(const FloatRect&) = 0;
-    
+    virtual bool needsDisplay() const { return false; }
+
     virtual void setContentsNeedsDisplay() { };
 
     // Set that the position/size of the contents (image or video).

Modified: tags/Safari-536.2.1/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (109854 => 109855)


--- tags/Safari-536.2.1/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h	2012-03-06 05:20:32 UTC (rev 109854)
+++ tags/Safari-536.2.1/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h	2012-03-06 05:23:04 UTC (rev 109855)
@@ -103,6 +103,7 @@
 
     virtual void setNeedsDisplay();
     virtual void setNeedsDisplayInRect(const FloatRect&);
+    virtual bool needsDisplay() const OVERRIDE { return !m_dirtyRects.isEmpty(); }
     virtual void setContentsNeedsDisplay();
     
     virtual void setContentsRect(const IntRect&);

Modified: tags/Safari-536.2.1/Source/WebKit2/ChangeLog (109854 => 109855)


--- tags/Safari-536.2.1/Source/WebKit2/ChangeLog	2012-03-06 05:20:32 UTC (rev 109854)
+++ tags/Safari-536.2.1/Source/WebKit2/ChangeLog	2012-03-06 05:23:04 UTC (rev 109855)
@@ -1,5 +1,28 @@
 2011-03-05  Lucas Forschler  <[email protected]>
 
+    Merge 109812
+
+    2012-03-05  Anders Carlsson  <[email protected]>
+
+            Be more aggressive about repainting page overlays
+            https://bugs.webkit.org/show_bug.cgi?id=80336
+            <rdar://problem/10965943>
+
+            Reviewed by Simon Fraser.
+
+            Whenever we're flushing layers and we have a page overlay, check if the main frame
+            has scrolled or if the main frame root content layer needs to be repainted and force the
+            overlay layer to be repainted if either of those conditions are true.
+
+            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+            (TiledCoreAnimationDrawingArea):
+            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+            (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
+            (WebKit::TiledCoreAnimationDrawingArea::shouldRepaintPageOverlayLayer):
+            (WebKit):
+
+2011-03-05  Lucas Forschler  <[email protected]>
+
     Merge 109801
 
     2012-03-05  Anders Carlsson  <[email protected]>

Modified: tags/Safari-536.2.1/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (109854 => 109855)


--- tags/Safari-536.2.1/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h	2012-03-06 05:20:32 UTC (rev 109854)
+++ tags/Safari-536.2.1/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h	2012-03-06 05:23:04 UTC (rev 109855)
@@ -81,6 +81,8 @@
     void createPageOverlayLayer();
     void destroyPageOverlayLayer();
 
+    bool shouldRepaintPageOverlayLayer();
+
     bool m_layerTreeStateIsFrozen;
     WebCore::LayerFlushScheduler m_layerFlushScheduler;
 
@@ -89,6 +91,7 @@
     RetainPtr<CALayer> m_pendingRootCompositingLayer;
 
     OwnPtr<WebCore::GraphicsLayer> m_pageOverlayLayer;
+    WebCore::FloatPoint m_mainFrameScrollLayerPosition;
 };
 
 } // namespace WebKit

Modified: tags/Safari-536.2.1/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (109854 => 109855)


--- tags/Safari-536.2.1/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-03-06 05:20:32 UTC (rev 109854)
+++ tags/Safari-536.2.1/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-03-06 05:23:04 UTC (rev 109855)
@@ -37,6 +37,8 @@
 #import <WebCore/FrameView.h>
 #import <WebCore/GraphicsContext.h>
 #import <WebCore/Page.h>
+#import <WebCore/RenderLayerCompositor.h>
+#import <WebCore/RenderView.h>
 #import <WebCore/ScrollingCoordinator.h>
 #import <WebCore/Settings.h>
 
@@ -215,8 +217,12 @@
         m_pendingRootCompositingLayer = nullptr;
     }
 
-    if (m_pageOverlayLayer)
+    if (m_pageOverlayLayer) {
+        if (shouldRepaintPageOverlayLayer())
+            m_pageOverlayLayer->setNeedsDisplay();
+
         m_pageOverlayLayer->syncCompositingStateForThisLayerOnly();
+    }
 
     bool returnValue = m_webPage->corePage()->mainFrame()->view()->syncCompositingStateIncludingSubframes();
 
@@ -295,4 +301,20 @@
     m_pageOverlayLayer = nullptr;
 }
 
+bool TiledCoreAnimationDrawingArea::shouldRepaintPageOverlayLayer()
+{
+    RenderLayerCompositor* renderLayerCompositor = m_webPage->corePage()->mainFrame()->contentRenderer()->compositor();
+    GraphicsLayer* scrollLayer = renderLayerCompositor->scrollLayer();
+    if (m_mainFrameScrollLayerPosition != scrollLayer->position()) {
+        m_mainFrameScrollLayerPosition = scrollLayer->position();
+        return true;
+    }
+
+    GraphicsLayer* rootGraphicsLayer = renderLayerCompositor->rootRenderLayer()->backing()->graphicsLayer();
+    if (rootGraphicsLayer->needsDisplay())
+        return true;
+   
+    return false;
+}
+
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to