Commit 07a5be6e authored by antti@apple.com's avatar antti@apple.com

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:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d6dbf580
2013-04-09 Antti Koivisto <antti@apple.com>
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 <a.suchit@samsung.com>
Table border doesn't show up
......@@ -3320,7 +3320,7 @@ NetworkingContext* FrameLoader::networkingContext() const
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
......
......@@ -2295,11 +2295,13 @@ void FrameView::endDisableRepaints()
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
......
......@@ -236,7 +236,7 @@ public:
void startDeferredRepaintTimer(double delay);
void resetDeferredRepaintDelay();
void updateLayerFlushThrottling(bool isLoadProgressing);
void updateLayerFlushThrottlingInAllFrames(bool isLoadProgressing);
void beginDisableRepaints();
void endDisableRepaints();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment