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

Side by Side Diff: third_party/WebKit/Source/platform/testing/PaintPropertyTestHelpers.h

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/ClipPaintPropertyNode.h" 5 #include "platform/graphics/paint/ClipPaintPropertyNode.h"
6 #include "platform/graphics/paint/EffectPaintPropertyNode.h" 6 #include "platform/graphics/paint/EffectPaintPropertyNode.h"
7 #include "platform/graphics/paint/PaintChunkProperties.h" 7 #include "platform/graphics/paint/PaintChunkProperties.h"
8 #include "platform/graphics/paint/TransformPaintPropertyNode.h" 8 #include "platform/graphics/paint/TransformPaintPropertyNode.h"
9 9
10 namespace blink { 10 namespace blink {
11 namespace testing { 11 namespace testing {
12 12
13 static inline PassRefPtr<EffectPaintPropertyNode> createOpacityOnlyEffect( 13 static inline PassRefPtr<EffectPaintPropertyNode> createOpacityOnlyEffect(
14 PassRefPtr<const EffectPaintPropertyNode> parent, 14 PassRefPtr<const EffectPaintPropertyNode> parent,
15 float opacity) { 15 float opacity) {
16 RefPtr<TransformPaintPropertyNode> localTransformSpace = 16 RefPtr<TransformPaintPropertyNode> localTransformSpace =
17 const_cast<TransformPaintPropertyNode*>(parent->localTransformSpace()); 17 const_cast<TransformPaintPropertyNode*>(parent->localTransformSpace());
18 RefPtr<ClipPaintPropertyNode> outputClip = 18 RefPtr<ClipPaintPropertyNode> outputClip =
19 const_cast<ClipPaintPropertyNode*>(parent->outputClip()); 19 const_cast<ClipPaintPropertyNode*>(parent->outputClip());
20 return EffectPaintPropertyNode::create( 20 return EffectPaintPropertyNode::create(
21 std::move(parent), std::move(localTransformSpace), std::move(outputClip), 21 std::move(parent), std::move(localTransformSpace), std::move(outputClip),
22 ColorFilterNone, CompositorFilterOperations(), opacity, 22 ColorFilterNone, CompositorFilterOperations(), opacity,
23 SkBlendMode::kSrcOver); 23 SkBlendMode::kSrcOver);
24 } 24 }
25 25
26 static inline PaintChunkProperties defaultPaintChunkProperties() { 26 static inline PaintChunkProperties defaultPaintChunkProperties() {
27 PropertyTreeState propertyTreeState(TransformPaintPropertyNode::root(), 27 PaintChunkProperties defaultProperties(PropertyTreeState::root());
28 ClipPaintPropertyNode::root(),
29 EffectPaintPropertyNode::root());
30 PaintChunkProperties defaultProperties(propertyTreeState);
31 28
32 return defaultProperties; 29 return defaultProperties;
33 } 30 }
34 31
35 } // namespace testing 32 } // namespace testing
36 } // namespace blink 33 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698