Title: [149105] trunk/Source/WebCore
Revision
149105
Author
[email protected]
Date
2013-04-25 06:23:47 -0700 (Thu, 25 Apr 2013)

Log Message

REGRESSION (r147797): Animations slideshows of images on www.thesuperficial.com are slow
https://bugs.webkit.org/show_bug.cgi?id=115172

Reviewed by Andreas Kling.

On this page ads dynamically loaded to subframes on slideshow navigation switch us to state where we throttle layer flushes.
        
Fix by ignoring any subframe-originated loads when determining throttling.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadProgressingStatusChanged):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::isMainLoadProgressing):
        
    Rename, ignore subframe originated loads. Subframe loads that are initiated during the main load still count.

* loader/ProgressTracker.h:
(ProgressTracker):
* page/FrameView.cpp:
(WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
* page/FrameView.h:
(FrameView):
* rendering/RenderLayerBacking.cpp:
(WebCore::computeTileCoverage):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (149104 => 149105)


--- trunk/Source/WebCore/ChangeLog	2013-04-25 13:10:15 UTC (rev 149104)
+++ trunk/Source/WebCore/ChangeLog	2013-04-25 13:23:47 UTC (rev 149105)
@@ -1,3 +1,30 @@
+2013-04-25  Antti Koivisto  <[email protected]>
+
+        REGRESSION (r147797): Animations slideshows of images on www.thesuperficial.com are slow
+        https://bugs.webkit.org/show_bug.cgi?id=115172
+
+        Reviewed by Andreas Kling.
+
+        On this page ads dynamically loaded to subframes on slideshow navigation switch us to state where we throttle layer flushes.
+        
+        Fix by ignoring any subframe-originated loads when determining throttling.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::loadProgressingStatusChanged):
+        * loader/ProgressTracker.cpp:
+        (WebCore::ProgressTracker::isMainLoadProgressing):
+        
+            Rename, ignore subframe originated loads. Subframe loads that are initiated during the main load still count.
+
+        * loader/ProgressTracker.h:
+        (ProgressTracker):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
+        * page/FrameView.h:
+        (FrameView):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::computeTileCoverage):
+
 2013-04-25  Andreas Kling  <[email protected]>
 
         SVG: Fix viewBox animations on shapes with non-scaling-stroke.

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (149104 => 149105)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2013-04-25 13:10:15 UTC (rev 149104)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2013-04-25 13:23:47 UTC (rev 149105)
@@ -3319,9 +3319,8 @@
 
 void FrameLoader::loadProgressingStatusChanged()
 {
-    bool isLoadProgressing = m_frame->page()->progress()->isLoadProgressing();
     FrameView* view = m_frame->page()->mainFrame()->view();
-    view->updateLayerFlushThrottlingInAllFrames(isLoadProgressing);
+    view->updateLayerFlushThrottlingInAllFrames();
     view->adjustTiledBackingCoverage();
 }
 

Modified: trunk/Source/WebCore/loader/ProgressTracker.cpp (149104 => 149105)


--- trunk/Source/WebCore/loader/ProgressTracker.cpp	2013-04-25 13:10:15 UTC (rev 149104)
+++ trunk/Source/WebCore/loader/ProgressTracker.cpp	2013-04-25 13:23:47 UTC (rev 149105)
@@ -283,8 +283,13 @@
     return ++s_uniqueIdentifier;
 }
 
-bool ProgressTracker::isLoadProgressing() const
+bool ProgressTracker::isMainLoadProgressing() const
 {
+    if (!m_originatingProgressFrame)
+        return false;
+    // See if the load originated from a subframe.
+    if (m_originatingProgressFrame->tree()->parent())
+        return false;
     return m_progressValue && m_progressValue < finalProgressValue && m_heartbeatsWithNoProgress < loadStalledHeartbeatCount;
 }
 

Modified: trunk/Source/WebCore/loader/ProgressTracker.h (149104 => 149105)


--- trunk/Source/WebCore/loader/ProgressTracker.h	2013-04-25 13:10:15 UTC (rev 149104)
+++ trunk/Source/WebCore/loader/ProgressTracker.h	2013-04-25 13:23:47 UTC (rev 149105)
@@ -59,7 +59,7 @@
     long long totalPageAndResourceBytesToLoad() const { return m_totalPageAndResourceBytesToLoad; }
     long long totalBytesReceived() const { return m_totalBytesReceived; }
 
-    bool isLoadProgressing() const;
+    bool isMainLoadProgressing() const;
 
 private:
     ProgressTracker();

Modified: trunk/Source/WebCore/page/FrameView.cpp (149104 => 149105)


--- trunk/Source/WebCore/page/FrameView.cpp	2013-04-25 13:10:15 UTC (rev 149104)
+++ trunk/Source/WebCore/page/FrameView.cpp	2013-04-25 13:23:47 UTC (rev 149105)
@@ -56,6 +56,7 @@
 #include "InspectorController.h"
 #include "InspectorInstrumentation.h"
 #include "OverflowEvent.h"
+#include "ProgressTracker.h"
 #include "RenderArena.h"
 #include "RenderEmbeddedObject.h"
 #include "RenderFullScreen.h"
@@ -2319,15 +2320,14 @@
     m_disableRepaints--;
 }
 
-void FrameView::updateLayerFlushThrottlingInAllFrames(bool isLoadProgressing)
+void FrameView::updateLayerFlushThrottlingInAllFrames()
 {
 #if USE(ACCELERATED_COMPOSITING)
+    bool isMainLoadProgressing = m_frame->page()->progress()->isMainLoadProgressing();
     for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNext(m_frame.get())) {
         if (RenderView* renderView = frame->contentRenderer())
-            renderView->compositor()->setLayerFlushThrottlingEnabled(isLoadProgressing);
+            renderView->compositor()->setLayerFlushThrottlingEnabled(isMainLoadProgressing);
     }
-#else
-    UNUSED_PARAM(isLoadProgressing);
 #endif
 }
 

Modified: trunk/Source/WebCore/page/FrameView.h (149104 => 149105)


--- trunk/Source/WebCore/page/FrameView.h	2013-04-25 13:10:15 UTC (rev 149104)
+++ trunk/Source/WebCore/page/FrameView.h	2013-04-25 13:23:47 UTC (rev 149105)
@@ -238,7 +238,7 @@
     void startDeferredRepaintTimer(double delay);
     void resetDeferredRepaintDelay();
 
-    void updateLayerFlushThrottlingInAllFrames(bool isLoadProgressing);
+    void updateLayerFlushThrottlingInAllFrames();
     void adjustTiledBackingCoverage();
 
     void beginDisableRepaints();

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (149104 => 149105)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2013-04-25 13:10:15 UTC (rev 149104)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2013-04-25 13:23:47 UTC (rev 149105)
@@ -222,7 +222,7 @@
     bool useMinimalTilesDuringLoading = false;
     // Avoid churn.
     if (!backing->didSwitchToFullTileCoverageDuringLoading()) {
-        useMinimalTilesDuringLoading = !frameView->isVisuallyNonEmpty() || (frame->page()->progress()->isLoadProgressing() && !frameView->wasScrolledByUser());
+        useMinimalTilesDuringLoading = !frameView->isVisuallyNonEmpty() || (frame->page()->progress()->isMainLoadProgressing() && !frameView->wasScrolledByUser());
         if (!useMinimalTilesDuringLoading)
             backing->setDidSwitchToFullTileCoverageDuringLoading();
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to