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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2724083002: [SPv2] Decomposite otherwise-compositable animations that paint nothing. (Closed)
Patch Set: Progress. Created 3 years, 9 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: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index a81c4447504eac6862e5716524517fc60d42c3dc..9511ed7f8c050412b7b021f062df9b2c9257a215 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -3102,8 +3102,11 @@ void FrameView::updateLifecyclePhasesInternal(
RuntimeEnabledFeatures::printBrowserEnabled())
paintTree();
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
- pushPaintArtifactToCompositor();
+ Optional<CompositorElementIdSet> compositedAnimationElementIds;
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ compositedAnimationElementIds.emplace();
pdr. 2017/03/16 21:20:05 Is "animation" correct here? Are we returning comp
wkorman 2017/03/16 21:53:31 Name needs improvement, agreed, let's come up with
pdr. 2017/03/16 22:16:01 compositedElementIds SGTM short is beautiful
+ pushPaintArtifactToCompositor(compositedAnimationElementIds.value());
pdr. 2017/03/16 21:20:05 Idea for not needing to pass this Optional around
wkorman 2017/03/16 21:53:31 I like this general idea. How do you envision mark
pdr. 2017/03/16 22:16:01 I was thinking about re-using setEffectSuppressed
wkorman 2017/03/16 22:32:25 Yes, but the overhead of an omnipresent bool field
+ }
DCHECK(!view.hasPendingSelection());
DCHECK((m_frame->document()->printing() &&
@@ -3112,7 +3115,8 @@ void FrameView::updateLifecyclePhasesInternal(
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
DocumentAnimations::updateAnimations(layoutView()->document(),
pdr. 2017/03/16 21:20:05 Can this call be moved right after pushPaintArtifa
wkorman 2017/03/16 21:53:31 Yes, though I think we'd want to duplicate the two
pdr. 2017/03/16 22:16:01 Do the checks actually need to come before updateA
- DocumentLifecycle::PaintClean);
+ DocumentLifecycle::PaintClean,
+ compositedAnimationElementIds);
}
}
@@ -3251,7 +3255,8 @@ void FrameView::paintGraphicsLayerRecursively(GraphicsLayer* graphicsLayer) {
paintGraphicsLayerRecursively(child);
}
-void FrameView::pushPaintArtifactToCompositor() {
+void FrameView::pushPaintArtifactToCompositor(
+ CompositorElementIdSet& compositedAnimationElementIds) {
TRACE_EVENT0("blink", "FrameView::pushPaintArtifactToCompositor");
DCHECK(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
@@ -3272,7 +3277,8 @@ void FrameView::pushPaintArtifactToCompositor() {
m_paintArtifactCompositor->update(
m_paintController->paintArtifact(),
m_paintController->paintChunksRasterInvalidationTrackingMap(),
- m_isStoringCompositedLayerDebugInfo, *m_geometryMapper);
+ m_isStoringCompositedLayerDebugInfo, *m_geometryMapper,
+ compositedAnimationElementIds);
}
std::unique_ptr<JSONObject> FrameView::compositedLayersAsJSON(

Powered by Google App Engine
This is Rietveld 408576698