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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2693363002: Move animation update to follow paint phase for SPv2. (Closed)
Patch Set: Update comment. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 3040 matching lines...) Expand 10 before | Expand all | Expand 10 after
3051 } 3051 }
3052 updateCompositedSelectionIfNeeded(); 3052 updateCompositedSelectionIfNeeded();
3053 } 3053 }
3054 3054
3055 // TODO(pdr): prePaint should be under the "Paint" devtools timeline step 3055 // TODO(pdr): prePaint should be under the "Paint" devtools timeline step
3056 // for slimming paint v2. 3056 // for slimming paint v2.
3057 if (targetState >= DocumentLifecycle::PrePaintClean) 3057 if (targetState >= DocumentLifecycle::PrePaintClean)
3058 prePaint(); 3058 prePaint();
3059 } 3059 }
3060 3060
3061 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
3062 DocumentAnimations::updateAnimations(layoutView()->document());
3063
3064 if (targetState == DocumentLifecycle::PaintClean) { 3061 if (targetState == DocumentLifecycle::PaintClean) {
3065 if (!m_frame->document()->printing() || 3062 if (!m_frame->document()->printing() ||
3066 RuntimeEnabledFeatures::printBrowserEnabled()) 3063 RuntimeEnabledFeatures::printBrowserEnabled())
3067 paintTree(); 3064 paintTree();
3068 3065
3069 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) 3066 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
3070 pushPaintArtifactToCompositor(); 3067 pushPaintArtifactToCompositor();
3071 3068
3072 DCHECK(!view.hasPendingSelection()); 3069 DCHECK(!view.hasPendingSelection());
3073 DCHECK((m_frame->document()->printing() && 3070 DCHECK((m_frame->document()->printing() &&
3074 lifecycle().state() == DocumentLifecycle::PrePaintClean) || 3071 lifecycle().state() == DocumentLifecycle::PrePaintClean) ||
3075 lifecycle().state() == DocumentLifecycle::PaintClean); 3072 lifecycle().state() == DocumentLifecycle::PaintClean);
3073
3074 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
3075 DocumentAnimations::updateAnimations(layoutView()->document(),
3076 DocumentLifecycle::PaintClean);
3077 }
3076 } 3078 }
3077 3079
3078 forAllNonThrottledFrameViews([](FrameView& frameView) { 3080 forAllNonThrottledFrameViews([](FrameView& frameView) {
3079 frameView.checkDoesNotNeedLayout(); 3081 frameView.checkDoesNotNeedLayout();
3080 frameView.m_allowsLayoutInvalidationAfterLayoutClean = true; 3082 frameView.m_allowsLayoutInvalidationAfterLayoutClean = true;
3081 }); 3083 });
3082 } 3084 }
3083 3085
3084 updateViewportIntersectionsForSubtree(targetState); 3086 updateViewportIntersectionsForSubtree(targetState);
3085 } 3087 }
(...skipping 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after
5191 void FrameView::setAnimationHost( 5193 void FrameView::setAnimationHost(
5192 std::unique_ptr<CompositorAnimationHost> host) { 5194 std::unique_ptr<CompositorAnimationHost> host) {
5193 m_animationHost = std::move(host); 5195 m_animationHost = std::move(host);
5194 } 5196 }
5195 5197
5196 LayoutUnit FrameView::caretWidth() const { 5198 LayoutUnit FrameView::caretWidth() const {
5197 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5199 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5198 } 5200 }
5199 5201
5200 } // namespace blink 5202 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698