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

Unified Diff: Source/core/testing/Internals.cpp

Issue 26110004: Defer the real work in updateCompositingLayers until it's really needed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: patch for landing Created 7 years, 2 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
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 6ee18f61e55afe37d3068e3a3602f06574072e3f..27c1393738151cdcab69fdd49717704d769b803b 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1858,6 +1858,12 @@ String Internals::mainThreadScrollingReasons(Document* document, ExceptionState&
return String();
}
+ // Force a re-layout and a compositing update.
+ document->updateLayout();
+ RenderView* view = document->renderView();
+ if (view->compositor())
+ view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDeferredWork);
+
Page* page = document->page();
if (!page)
return String();
@@ -2291,4 +2297,18 @@ bool Internals::loseSharedGraphicsContext3D()
return true;
}
+void Internals::forceCompositingUpdate(Document* document, ExceptionState& es)
+{
+ if (!document || !document->renderView()) {
+ es.throwUninformativeAndGenericDOMException(InvalidAccessError);
+ return;
+ }
+
+ document->updateLayout();
+
+ RenderView* view = document->renderView();
+ if (view->compositor())
+ view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDeferredWork);
+}
+
}
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698