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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2724083002: [SPv2] Decomposite otherwise-compositable animations that paint nothing. (Closed)
Patch Set: Add unit tests. Created 3 years, 8 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PaintPropertyTreeBuilder.h" 5 #include "core/paint/PaintPropertyTreeBuilder.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "core/dom/DOMNodeIds.h" 8 #include "core/dom/DOMNodeIds.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 std::move(localTransformSpace), clipRect); 66 std::move(localTransformSpace), clipRect);
67 return false; 67 return false;
68 } 68 }
69 frameView.setContentClip(ClipPaintPropertyNode::create( 69 frameView.setContentClip(ClipPaintPropertyNode::create(
70 std::move(parent), std::move(localTransformSpace), clipRect)); 70 std::move(parent), std::move(localTransformSpace), clipRect));
71 return true; 71 return true;
72 } 72 }
73 73
74 static CompositorElementId createDomNodeBasedCompositorElementId( 74 static CompositorElementId createDomNodeBasedCompositorElementId(
75 const LayoutObject& object) { 75 const LayoutObject& object) {
76 // TODO(wkorman): Centralize this implementation with similar across
77 // animation, scrolling and compositing logic.
76 return createCompositorElementId(DOMNodeIds::idForNode(object.node()), 78 return createCompositorElementId(DOMNodeIds::idForNode(object.node()),
77 CompositorSubElementId::Primary); 79 CompositorSubElementId::Primary);
78 } 80 }
79 81
80 // True if a new property was created or a main thread scrolling reason changed 82 // True if a new property was created or a main thread scrolling reason changed
81 // (which can affect descendants), false if an existing one was updated. 83 // (which can affect descendants), false if an existing one was updated.
82 static bool updateScrollTranslation( 84 static bool updateScrollTranslation(
83 FrameView& frameView, 85 FrameView& frameView,
84 PassRefPtr<const TransformPaintPropertyNode> parent, 86 PassRefPtr<const TransformPaintPropertyNode> parent,
85 const TransformationMatrix& matrix, 87 const TransformationMatrix& matrix,
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 updateOverflowClip(object, context); 1130 updateOverflowClip(object, context);
1129 updatePerspective(object, context); 1131 updatePerspective(object, context);
1130 updateSvgLocalToBorderBoxTransform(object, context); 1132 updateSvgLocalToBorderBoxTransform(object, context);
1131 updateScrollAndScrollTranslation(object, context); 1133 updateScrollAndScrollTranslation(object, context);
1132 updateOutOfFlowContext(object, context); 1134 updateOutOfFlowContext(object, context);
1133 1135
1134 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); 1136 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate();
1135 } 1137 }
1136 1138
1137 } // namespace blink 1139 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698