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

Unified Diff: src/core/SkDevice.cpp

Issue 1308703007: Fix filter primitive bounds computations. (Closed) Base URL: https://skia.googlesource.com/skia.git@saveLayer-bounds-not-transformed
Patch Set: Fix comment style; remove useless param names Created 5 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
Index: src/core/SkDevice.cpp
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index cf4a279b355523be1a982af8a989e014beaf7938..cf57c2d7006718aabfdff28cadbc8e21a0915e20 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -411,7 +411,11 @@ void SkBaseDevice::drawBitmapAsSprite(const SkDraw& draw, const SkBitmap& bitmap
SkIPoint offset = SkIPoint::Make(0, 0);
SkMatrix matrix = *draw.fMatrix;
matrix.postTranslate(SkIntToScalar(-x), SkIntToScalar(-y));
+#ifdef SK_SUPPORT_SRC_BOUNDS_BLOAT_FOR_IMAGEFILTERS
const SkIRect clipBounds = bitmap.bounds();
+#else
+ const SkIRect clipBounds = draw.fClip->getBounds().makeOffset(-x, -y);
+#endif
SkAutoTUnref<SkImageFilter::Cache> cache(this->getImageFilterCache());
SkImageFilter::Context ctx(matrix, clipBounds, cache.get(),
SkImageFilter::kApprox_SizeConstraint);
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | src/core/SkRecordDraw.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698