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

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

Issue 2564193002: [SPv2] Add CSS mix-blend-mode support (Closed)
Patch Set: fix msvc warning Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ScrollPaintPropertyNode.h" 8 #include "platform/graphics/paint/ScrollPaintPropertyNode.h"
9 #include "platform/graphics/paint/TransformPaintPropertyNode.h" 9 #include "platform/graphics/paint/TransformPaintPropertyNode.h"
10 10
11 namespace blink { 11 namespace blink {
12 namespace testing { 12 namespace testing {
13 13
14 static inline PassRefPtr<EffectPaintPropertyNode> createOpacityOnlyEffect( 14 static inline PassRefPtr<EffectPaintPropertyNode> createOpacityOnlyEffect(
15 PassRefPtr<const EffectPaintPropertyNode> parent, 15 PassRefPtr<const EffectPaintPropertyNode> parent,
16 float opacity) { 16 float opacity) {
17 RefPtr<TransformPaintPropertyNode> localTransformSpace = 17 RefPtr<TransformPaintPropertyNode> localTransformSpace =
18 const_cast<TransformPaintPropertyNode*>(parent->localTransformSpace()); 18 const_cast<TransformPaintPropertyNode*>(parent->localTransformSpace());
19 RefPtr<ClipPaintPropertyNode> outputClip = 19 RefPtr<ClipPaintPropertyNode> outputClip =
20 const_cast<ClipPaintPropertyNode*>(parent->outputClip()); 20 const_cast<ClipPaintPropertyNode*>(parent->outputClip());
21 return EffectPaintPropertyNode::create( 21 return EffectPaintPropertyNode::create(
22 std::move(parent), std::move(localTransformSpace), std::move(outputClip), 22 std::move(parent), std::move(localTransformSpace), std::move(outputClip),
23 CompositorFilterOperations(), opacity); 23 CompositorFilterOperations(), opacity, SkBlendMode::kSrcOver);
24 } 24 }
25 25
26 static inline PaintChunkProperties defaultPaintChunkProperties() { 26 static inline PaintChunkProperties defaultPaintChunkProperties() {
27 PropertyTreeState propertyTreeState( 27 PropertyTreeState propertyTreeState(
28 TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(), 28 TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(),
29 EffectPaintPropertyNode::root(), ScrollPaintPropertyNode::root()); 29 EffectPaintPropertyNode::root(), ScrollPaintPropertyNode::root());
30 PaintChunkProperties defaultProperties(propertyTreeState); 30 PaintChunkProperties defaultProperties(propertyTreeState);
31 31
32 return defaultProperties; 32 return defaultProperties;
33 } 33 }
34 34
35 } // namespace testing 35 } // namespace testing
36 } // namespace blink 36 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698