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

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

Issue 112053007: Compute source/destination rectangles in FEComponentTransfer::applySkia (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test touched up. Created 7 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
« no previous file with comments | « LayoutTests/svg/filters/feComponentTransfer-subregion-expected.svg ('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/FEComponentTransfer.cpp
diff --git a/Source/platform/graphics/filters/FEComponentTransfer.cpp b/Source/platform/graphics/filters/FEComponentTransfer.cpp
index c554583071232944611defd58aeef82f4dbf5e7f..2ebb1e3f72ae21d5df06fb7864382e0c2e647ffc 100644
--- a/Source/platform/graphics/filters/FEComponentTransfer.cpp
+++ b/Source/platform/graphics/filters/FEComponentTransfer.cpp
@@ -189,10 +189,12 @@ bool FEComponentTransfer::applySkia()
unsigned char rValues[256], gValues[256], bValues[256], aValues[256];
getValues(rValues, gValues, bValues, aValues);
+ SkRect skSrc = requestedRegionOfInputImageData(in->absolutePaintRect());
+ SkRect skDst = IntRect(IntPoint(), absolutePaintRect().size());
SkPaint paint;
paint.setColorFilter(SkTableColorFilter::CreateARGB(aValues, rValues, gValues, bValues))->unref();
paint.setXfermodeMode(SkXfermode::kSrc_Mode);
- resultImage->context()->drawBitmap(nativeImage->bitmap(), 0, 0, &paint);
+ resultImage->context()->drawBitmapRect(nativeImage->bitmap(), &skSrc, skDst, &paint);
return true;
}
« no previous file with comments | « LayoutTests/svg/filters/feComponentTransfer-subregion-expected.svg ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698