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

Unified Diff: Source/platform/graphics/filters/FEComposite.cpp

Issue 365163002: Use correct destination rectangle in FEComposite w/ type='in' (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Attempt to Mac-proof TC. Created 6 years, 5 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
« no previous file with comments | « LayoutTests/css3/filters/fecomposite-non-zero-inoffset-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/filters/FEComposite.cpp
diff --git a/Source/platform/graphics/filters/FEComposite.cpp b/Source/platform/graphics/filters/FEComposite.cpp
index a284840343ddedf2449f4dad5f09b8df891c1125..532b186b29084225cae2620f8db4ea7f1577c84c 100644
--- a/Source/platform/graphics/filters/FEComposite.cpp
+++ b/Source/platform/graphics/filters/FEComposite.cpp
@@ -331,15 +331,13 @@ void FEComposite::applySoftware()
destinationRect.intersect(absolutePaintRect());
if (destinationRect.isEmpty())
break;
- IntPoint destinationPoint(destinationRect.x() - absolutePaintRect().x(), destinationRect.y() - absolutePaintRect().y());
FloatRect sourceRect(IntPoint(destinationRect.x() - in->absolutePaintRect().x(),
destinationRect.y() - in->absolutePaintRect().y()), destinationRect.size());
FloatRect source2Rect(IntPoint(destinationRect.x() - in2->absolutePaintRect().x(),
destinationRect.y() - in2->absolutePaintRect().y()), destinationRect.size());
- filterContext->drawImageBuffer(imageBuffer2,
- FloatRect(destinationPoint, imageBuffer2->size()), &source2Rect);
- filterContext->drawImageBuffer(imageBuffer,
- FloatRect(destinationPoint, imageBuffer->size()), &sourceRect, CompositeSourceIn);
+ destinationRect.move(-absolutePaintRect().x(), -absolutePaintRect().y());
+ filterContext->drawImageBuffer(imageBuffer2, destinationRect, &source2Rect);
+ filterContext->drawImageBuffer(imageBuffer, destinationRect, &sourceRect, CompositeSourceIn);
break;
}
case FECOMPOSITE_OPERATOR_OUT:
« no previous file with comments | « LayoutTests/css3/filters/fecomposite-non-zero-inoffset-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698