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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.h b/third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.h
index 2d8fdec7aa3e87556e58e4ca2e2f9a155f5c482e..aec961f3f39f2ae5378ebde2562a15088ede3c9c 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.h
@@ -34,17 +34,19 @@ class PLATFORM_EXPORT EffectPaintPropertyNode
PassRefPtr<const TransformPaintPropertyNode> localTransformSpace,
PassRefPtr<const ClipPaintPropertyNode> outputClip,
CompositorFilterOperations filter,
- float opacity) {
+ float opacity,
+ SkBlendMode blendMode) {
return adoptRef(new EffectPaintPropertyNode(
std::move(parent), std::move(localTransformSpace),
- std::move(outputClip), std::move(filter), opacity));
+ std::move(outputClip), std::move(filter), opacity, blendMode));
}
void update(PassRefPtr<const EffectPaintPropertyNode> parent,
PassRefPtr<const TransformPaintPropertyNode> localTransformSpace,
PassRefPtr<const ClipPaintPropertyNode> outputClip,
CompositorFilterOperations filter,
- float opacity) {
+ float opacity,
+ SkBlendMode blendMode) {
DCHECK(!isRoot());
DCHECK(parent != this);
m_parent = parent;
@@ -52,6 +54,7 @@ class PLATFORM_EXPORT EffectPaintPropertyNode
m_outputClip = outputClip;
m_filter = std::move(filter);
m_opacity = opacity;
+ m_blendMode = blendMode;
}
const TransformPaintPropertyNode* localTransformSpace() const {
@@ -59,6 +62,7 @@ class PLATFORM_EXPORT EffectPaintPropertyNode
}
const ClipPaintPropertyNode* outputClip() const { return m_outputClip.get(); }
+ SkBlendMode blendMode() const { return m_blendMode; }
float opacity() const { return m_opacity; }
const CompositorFilterOperations& filter() const { return m_filter; }
@@ -72,8 +76,9 @@ class PLATFORM_EXPORT EffectPaintPropertyNode
// The clone function is used by FindPropertiesNeedingUpdate.h for recording
// an effect node before it has been updated, to later detect changes.
PassRefPtr<EffectPaintPropertyNode> clone() const {
- return adoptRef(new EffectPaintPropertyNode(
- m_parent, m_localTransformSpace, m_outputClip, m_filter, m_opacity));
+ return adoptRef(new EffectPaintPropertyNode(m_parent, m_localTransformSpace,
+ m_outputClip, m_filter,
+ m_opacity, m_blendMode));
}
// The equality operator is used by FindPropertiesNeedingUpdate.h for checking
@@ -83,6 +88,7 @@ class PLATFORM_EXPORT EffectPaintPropertyNode
return m_parent == o.m_parent &&
m_localTransformSpace == o.m_localTransformSpace &&
m_outputClip == o.m_outputClip && m_opacity == o.m_opacity &&
+ m_blendMode == o.m_blendMode &&
m_filter.equalsIgnoringReferenceFilters(o.m_filter);
}
#endif
@@ -95,12 +101,14 @@ class PLATFORM_EXPORT EffectPaintPropertyNode
PassRefPtr<const TransformPaintPropertyNode> localTransformSpace,
PassRefPtr<const ClipPaintPropertyNode> outputClip,
CompositorFilterOperations filter,
- float opacity)
+ float opacity,
+ SkBlendMode blendMode)
: m_parent(parent),
m_localTransformSpace(localTransformSpace),
m_outputClip(outputClip),
m_filter(std::move(filter)),
- m_opacity(opacity) {}
+ m_opacity(opacity),
+ m_blendMode(blendMode) {}
RefPtr<const EffectPaintPropertyNode> m_parent;
// The local transform space serves two purposes:
@@ -118,6 +126,7 @@ class PLATFORM_EXPORT EffectPaintPropertyNode
// === Begin of effects ===
CompositorFilterOperations m_filter;
float m_opacity;
+ SkBlendMode m_blendMode;
// === End of effects ===
// TODO(trchen): Remove the dummy layer.

Powered by Google App Engine
This is Rietveld 408576698