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

Unified Diff: gm/bitmapsource.cpp

Issue 182983003: Factory methods for heap-allocated SkImageFilter objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 6 years, 9 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 | « bench/MorphologyBench.cpp ('k') | gm/colorfilterimagefilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bitmapsource.cpp
diff --git a/gm/bitmapsource.cpp b/gm/bitmapsource.cpp
index f40cc15e9074c400b18c6c67f4d0c453999131f4..9cf5a75cae3e7fac0b1261c7dde2009e2111efaf 100644
--- a/gm/bitmapsource.cpp
+++ b/gm/bitmapsource.cpp
@@ -56,10 +56,10 @@ protected:
SkRect clipRect = SkRect::MakeXYWH(0, 0, 100, 100);
SkRect bounds;
fBitmap.getBounds(&bounds);
- SkAutoTUnref<SkImageFilter> bitmapSource(new SkBitmapSource(fBitmap));
- SkAutoTUnref<SkImageFilter> bitmapSourceSrcRect(new SkBitmapSource(fBitmap, srcRect, srcRect));
- SkAutoTUnref<SkImageFilter> bitmapSourceSrcRectDstRect(new SkBitmapSource(fBitmap, srcRect, dstRect));
- SkAutoTUnref<SkImageFilter> bitmapSourceDstRectOnly(new SkBitmapSource(fBitmap, bounds, dstRect));
+ SkAutoTUnref<SkImageFilter> bitmapSource(SkBitmapSource::Create(fBitmap));
+ SkAutoTUnref<SkImageFilter> bitmapSourceSrcRect(SkBitmapSource::Create(fBitmap, srcRect, srcRect));
+ SkAutoTUnref<SkImageFilter> bitmapSourceSrcRectDstRect(SkBitmapSource::Create(fBitmap, srcRect, dstRect));
+ SkAutoTUnref<SkImageFilter> bitmapSourceDstRectOnly(SkBitmapSource::Create(fBitmap, bounds, dstRect));
// Draw an unscaled bitmap.
fillRectFiltered(canvas, clipRect, bitmapSource);
« no previous file with comments | « bench/MorphologyBench.cpp ('k') | gm/colorfilterimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698