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

Unified Diff: Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp

Issue 1246363002: Avoid updating compositor animations in hitTest path (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix the bug in another method Created 5 years, 5 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/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
diff --git a/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp b/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
index 96cbd28a83e364b7906caa15d6adc7ab9b3b3b66..804cc7e049fde960b2aaf6a5b051e536d709ed1d 100644
--- a/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
+++ b/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
@@ -250,6 +250,30 @@ void DeprecatedPaintLayerCompositor::updateIfNeededRecursive()
#endif
}
+void DeprecatedPaintLayerCompositor::updateLifecycleToCompositingClean()
+{
+ for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); child; child = child->tree().nextSibling()) {
+ if (!child->isLocalFrame())
+ continue;
+ LocalFrame* localFrame = toLocalFrame(child);
+ if (localFrame->document()->isActive())
+ localFrame->contentLayoutObject()->compositor()->updateLifecycleToCompositingClean();
+ }
+
+ enableCompositingModeIfNeeded();
+
+ if (m_needsUpdateDescendantDependentFlags) {
+ updateDescendantDependentFlagsForEntireSubtree(*rootLayer());
+ m_needsUpdateDescendantDependentFlags = false;
+ }
+
+ m_layoutView.commitPendingSelection();
+
+ lifecycle().advanceTo(DocumentLifecycle::InCompositingUpdate);
+ updateIfNeeded();
+ lifecycle().advanceTo(DocumentLifecycle::CompositingClean);
+}
+
void DeprecatedPaintLayerCompositor::setNeedsCompositingUpdate(CompositingUpdateType updateType)
{
ASSERT(updateType != CompositingUpdateNone);

Powered by Google App Engine
This is Rietveld 408576698