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

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

Issue 2625133003: Handle geometry effects of filters in GeometryMapper (Closed)
Patch Set: - Created 3 years, 10 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..4a9bff9e52f31241e5f82631dac5018f5b65a5e4 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& inputRect) const {
+ FloatRect rect = inputRect;
+ rect.moveBy(-m_paintOffset);
+ FloatRect result = m_filter.mapRect(rect);
+ result.moveBy(m_paintOffset);
+ 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) "
+ "paintOffset=%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_paintOffset.toString().ascii().data());
}
#if DCHECK_IS_ON()

Powered by Google App Engine
This is Rietveld 408576698