Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: Source/web/WebViewImpl.cpp

Issue 1246173002: Throttle rendering pipeline for invisible iframes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Clean up logic. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 7d7ae970d4ac9b0388845d1e5d457848a017e079..44a298fcc3f41498335e826e338cb2a503460174 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -1883,6 +1883,9 @@ void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime)
// FIXME: This should probably be using the local root?
if (m_page->mainFrame()->isLocalFrame())
PageWidgetDelegate::animate(*m_page, validFrameTime.lastFrameTimeMonotonic, *m_page->deprecatedLocalMainFrame());
+
+ // HACK: simulate the commit signal for layout tests
+ //Platform::current()->mainThread()->postTask(FROM_HERE, bind(&WebViewImpl::didCommitCompositorFrame, this));
}
void WebViewImpl::layout()
@@ -1931,6 +1934,14 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)
Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
}
+void WebViewImpl::didCommitCompositorFrame()
+{
+ if (!mainFrameImpl() || !mainFrameImpl()->frameView())
+ return;
+ FrameView* view = mainFrameImpl()->frameView();
+ view->updateThrottling();
ojan 2015/09/01 19:56:48 I was picturing that this would be called uncondit
Sami 2015/09/02 10:46:03 Yeah, that was my assumption too but the problem i
ojan 2015/09/02 11:33:27 Ah right. Doing it synchronously in updateLifecycl
dglazkov 2015/09/03 16:51:28 I am still a little bit confused, please forgive m
Sami 2015/09/03 19:29:09 I just gave the PostTask approach a try since you
+}
+
#if OS(ANDROID)
void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& rect)
{

Powered by Google App Engine
This is Rietveld 408576698