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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp

Issue 2751433002: [SPv2] Flatten property trees in PaintRecordBuilder into a single display list. (Closed)
Patch Set: none 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "platform/graphics/paint/PropertyTreeState.h" 5 #include "platform/graphics/paint/PropertyTreeState.h"
6 6
7 #include "platform/graphics/paint/GeometryMapper.h" 7 #include "platform/graphics/paint/GeometryMapper.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 const PropertyTreeState& PropertyTreeState::root() {
12 DEFINE_STATIC_LOCAL(
13 std::unique_ptr<PropertyTreeState>, root,
14 (WTF::wrapUnique(new PropertyTreeState(
15 TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(),
16 EffectPaintPropertyNode::root()))));
17 return *root;
18 }
19
11 bool PropertyTreeState::hasDirectCompositingReasons() const { 20 bool PropertyTreeState::hasDirectCompositingReasons() const {
12 switch (innermostNode()) { 21 switch (innermostNode()) {
13 case Transform: 22 case Transform:
14 return transform()->hasDirectCompositingReasons(); 23 return transform()->hasDirectCompositingReasons();
15 case Clip: 24 case Clip:
16 return clip()->hasDirectCompositingReasons(); 25 return clip()->hasDirectCompositingReasons();
17 case Effect: 26 case Effect:
18 return effect()->hasDirectCompositingReasons(); 27 return effect()->hasDirectCompositingReasons();
19 default: 28 default:
20 return false; 29 return false;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #if DCHECK_IS_ON() 107 #if DCHECK_IS_ON()
99 108
100 String PropertyTreeState::toTreeString() const { 109 String PropertyTreeState::toTreeString() const {
101 return transform()->toTreeString() + "\n" + clip()->toTreeString() + "\n" + 110 return transform()->toTreeString() + "\n" + clip()->toTreeString() + "\n" +
102 effect()->toTreeString(); 111 effect()->toTreeString();
103 } 112 }
104 113
105 #endif 114 #endif
106 115
107 } // namespace blink 116 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698