Title: [148013] trunk/Source/WebCore
Revision
148013
Author
[email protected]
Date
2013-04-09 05:11:56 -0700 (Tue, 09 Apr 2013)

Log Message

Throttle compositing layer flushes in subframes
https://bugs.webkit.org/show_bug.cgi?id=114267

Reviewed by Andreas Kling.

Throttle compositing layer flushes in all frames, not just the main one.
        
This especially reduces flushes/repaints generated by ads in iframes.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadProgressingStatusChanged):
* page/FrameView.cpp:
(WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
* page/FrameView.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (148012 => 148013)


--- trunk/Source/WebCore/ChangeLog	2013-04-09 12:00:47 UTC (rev 148012)
+++ trunk/Source/WebCore/ChangeLog	2013-04-09 12:11:56 UTC (rev 148013)
@@ -1,3 +1,20 @@
+2013-04-09  Antti Koivisto  <[email protected]>
+
+        Throttle compositing layer flushes in subframes
+        https://bugs.webkit.org/show_bug.cgi?id=114267
+
+        Reviewed by Andreas Kling.
+
+        Throttle compositing layer flushes in all frames, not just the main one.
+        
+        This especially reduces flushes/repaints generated by ads in iframes.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::loadProgressingStatusChanged):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
+        * page/FrameView.h:
+
 2013-04-09  Suchit Agrawal  <[email protected]>
 
         Table border doesn't show up

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (148012 => 148013)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2013-04-09 12:00:47 UTC (rev 148012)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2013-04-09 12:11:56 UTC (rev 148013)
@@ -3320,7 +3320,7 @@
 void FrameLoader::loadProgressingStatusChanged()
 {
     bool isLoadProgressing = m_frame->page()->progress()->isLoadProgressing();
-    m_frame->page()->mainFrame()->view()->updateLayerFlushThrottling(isLoadProgressing);
+    m_frame->page()->mainFrame()->view()->updateLayerFlushThrottlingInAllFrames(isLoadProgressing);
 }
 
 void FrameLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const

Modified: trunk/Source/WebCore/page/FrameView.cpp (148012 => 148013)


--- trunk/Source/WebCore/page/FrameView.cpp	2013-04-09 12:00:47 UTC (rev 148012)
+++ trunk/Source/WebCore/page/FrameView.cpp	2013-04-09 12:11:56 UTC (rev 148013)
@@ -2295,11 +2295,13 @@
     m_disableRepaints--;
 }
 
-void FrameView::updateLayerFlushThrottling(bool isLoadProgressing)
+void FrameView::updateLayerFlushThrottlingInAllFrames(bool isLoadProgressing)
 {
 #if USE(ACCELERATED_COMPOSITING)
-    if (RenderView* view = renderView())
-        view->compositor()->setLayerFlushThrottlingEnabled(isLoadProgressing);
+    for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNext(m_frame.get())) {
+        if (RenderView* renderView = frame->contentRenderer())
+            renderView->compositor()->setLayerFlushThrottlingEnabled(isLoadProgressing);
+    }
 #else
     UNUSED_PARAM(isLoadProgressing);
 #endif

Modified: trunk/Source/WebCore/page/FrameView.h (148012 => 148013)


--- trunk/Source/WebCore/page/FrameView.h	2013-04-09 12:00:47 UTC (rev 148012)
+++ trunk/Source/WebCore/page/FrameView.h	2013-04-09 12:11:56 UTC (rev 148013)
@@ -236,7 +236,7 @@
     void startDeferredRepaintTimer(double delay);
     void resetDeferredRepaintDelay();
 
-    void updateLayerFlushThrottling(bool isLoadProgressing);
+    void updateLayerFlushThrottlingInAllFrames(bool isLoadProgressing);
 
     void beginDisableRepaints();
     void endDisableRepaints();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to