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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.cpp

Issue 2625133003: Handle geometry effects of filters in GeometryMapper (Closed)
Patch Set: Rebaseline tests Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.cpp b/third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.cpp
index 9ca9da31a0535c172a2cdef811196523b5df08f3..2a34b8735dc830d3531c4b589955cab11fb71478 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.cpp
@@ -18,6 +18,14 @@ EffectPaintPropertyNode* EffectPaintPropertyNode::root() {
return root;
}
+FloatRect EffectPaintPropertyNode::mapRect(const FloatRect& rect) const {
+ FloatRect inputRect = rect;
+ inputRect.moveBy(-m_offset);
+ FloatRect result = m_filter.mapRect(inputRect);
+ result.moveBy(m_offset);
+ return result;
+}
+
cc::Layer* EffectPaintPropertyNode::ensureDummyLayer() const {
if (m_dummyLayer)
return m_dummyLayer.get();
@@ -28,12 +36,14 @@ cc::Layer* EffectPaintPropertyNode::ensureDummyLayer() const {
String EffectPaintPropertyNode::toString() const {
return String::format(
"parent=%p localTransformSpace=%p outputClip=%p opacity=%f filter=%s "
- "blendMode=%s directCompositingReasons=%s compositorElementId=(%d, %d)",
+ "blendMode=%s directCompositingReasons=%s compositorElementId=(%d, %d) "
+ "offset=%s",
m_parent.get(), m_localTransformSpace.get(), m_outputClip.get(),
m_opacity, m_filter.toString().ascii().data(),
SkBlendMode_Name(m_blendMode),
compositingReasonsAsString(m_directCompositingReasons).ascii().data(),
- m_compositorElementId.primaryId, m_compositorElementId.secondaryId);
+ m_compositorElementId.primaryId, m_compositorElementId.secondaryId,
+ m_offset.toString().ascii().data());
}
#if DCHECK_IS_ON()

Powered by Google App Engine
This is Rietveld 408576698