Chromium Code Reviews| 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 b9c9d19ea27cab601ae6129e03a6244b1f7d2aa0..24e3efe68cf7c956b62d78903b56255cc4a3d5c5 100644 | 
| --- a/third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.h | 
| +++ b/third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.h | 
| @@ -39,11 +39,12 @@ class PLATFORM_EXPORT EffectPaintPropertyNode | 
| float opacity, | 
| SkBlendMode blendMode, | 
| CompositingReasons directCompositingReasons = CompositingReasonNone, | 
| - const CompositorElementId& compositorElementId = CompositorElementId()) { | 
| + const CompositorElementId& compositorElementId = CompositorElementId(), | 
| + const FloatPoint& offset = FloatPoint()) { | 
| return adoptRef(new EffectPaintPropertyNode( | 
| std::move(parent), std::move(localTransformSpace), | 
| std::move(outputClip), std::move(filter), opacity, blendMode, | 
| - directCompositingReasons, compositorElementId)); | 
| + directCompositingReasons, compositorElementId, offset)); | 
| } | 
| void update( | 
| @@ -54,7 +55,8 @@ class PLATFORM_EXPORT EffectPaintPropertyNode | 
| float opacity, | 
| SkBlendMode blendMode, | 
| CompositingReasons directCompositingReasons = CompositingReasonNone, | 
| - CompositorElementId compositorElementId = CompositorElementId()) { | 
| + const CompositorElementId& compositorElementId = CompositorElementId(), | 
| + const FloatPoint& offset = FloatPoint()) { | 
| DCHECK(!isRoot()); | 
| DCHECK(parent != this); | 
| m_parent = parent; | 
| @@ -65,6 +67,7 @@ class PLATFORM_EXPORT EffectPaintPropertyNode | 
| m_blendMode = blendMode; | 
| m_directCompositingReasons = directCompositingReasons; | 
| m_compositorElementId = compositorElementId; | 
| + m_offset = offset; | 
| } | 
| const TransformPaintPropertyNode* localTransformSpace() const { | 
| @@ -80,6 +83,14 @@ class PLATFORM_EXPORT EffectPaintPropertyNode | 
| const EffectPaintPropertyNode* parent() const { return m_parent.get(); } | 
| bool isRoot() const { return !m_parent; } | 
| + bool hasFilterThanMovesPixels() const { | 
| + return m_filter.hasFilterThatMovesPixels(); | 
| + } | 
| + | 
| + // Returns a rect covering the pixels that can be affected by pixels in the | 
| + // input rect. The rects are in the space of localTransformSpace. | 
| + FloatRect mapRect(const FloatRect&) const; | 
| 
 
chrishtr
2017/02/01 02:59:12
Nit: name the argument inputRect.
 
Xianzhu
2017/02/03 01:38:16
Done.
 
 | 
| + | 
| cc::Layer* ensureDummyLayer() const; | 
| #if DCHECK_IS_ON() | 
| @@ -88,7 +99,8 @@ class PLATFORM_EXPORT EffectPaintPropertyNode | 
| PassRefPtr<EffectPaintPropertyNode> clone() const { | 
| return adoptRef(new EffectPaintPropertyNode( | 
| m_parent, m_localTransformSpace, m_outputClip, m_filter, m_opacity, | 
| - m_blendMode, m_directCompositingReasons, m_compositorElementId)); | 
| + m_blendMode, m_directCompositingReasons, m_compositorElementId, | 
| + m_offset)); | 
| } | 
| // The equality operator is used by FindPropertiesNeedingUpdate.h for checking | 
| @@ -101,7 +113,8 @@ class PLATFORM_EXPORT EffectPaintPropertyNode | 
| m_filter.equalsIgnoringReferenceFilters(o.m_filter) && | 
| m_opacity == o.m_opacity && m_blendMode == o.m_blendMode && | 
| m_directCompositingReasons == o.m_directCompositingReasons && | 
| - m_compositorElementId == o.m_compositorElementId; | 
| + m_compositorElementId == o.m_compositorElementId && | 
| + m_offset == o.m_offset; | 
| } | 
| String toTreeString() const; | 
| @@ -126,7 +139,8 @@ class PLATFORM_EXPORT EffectPaintPropertyNode | 
| float opacity, | 
| SkBlendMode blendMode, | 
| CompositingReasons directCompositingReasons, | 
| - CompositorElementId compositorElementId) | 
| + CompositorElementId compositorElementId, | 
| + const FloatPoint& offset) | 
| : m_parent(parent), | 
| m_localTransformSpace(localTransformSpace), | 
| m_outputClip(outputClip), | 
| @@ -134,7 +148,8 @@ class PLATFORM_EXPORT EffectPaintPropertyNode | 
| m_opacity(opacity), | 
| m_blendMode(blendMode), | 
| m_directCompositingReasons(directCompositingReasons), | 
| - m_compositorElementId(compositorElementId) {} | 
| + m_compositorElementId(compositorElementId), | 
| + m_offset(offset) {} | 
| RefPtr<const EffectPaintPropertyNode> m_parent; | 
| // The local transform space serves two purposes: | 
| @@ -164,6 +179,11 @@ class PLATFORM_EXPORT EffectPaintPropertyNode | 
| CompositingReasons m_directCompositingReasons; | 
| CompositorElementId m_compositorElementId; | 
| + | 
| + // The offset of the effect's local space in m_localTransformSpace. Some | 
| + // effects e.g. reflection need this to apply geometry effects in the local | 
| + // space. | 
| + FloatPoint m_offset; | 
| 
 
chrishtr
2017/02/01 02:59:12
Why not m_paintOffset?
 
Xianzhu
2017/02/03 01:38:16
No specific reason :)
Modified to paintOffset to k
 
 | 
| }; | 
| // Redeclared here to avoid ODR issues. |