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