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

Unified Diff: gm/bigtileimagefilter.cpp

Issue 1842243002: Update SkImageSource to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up Created 4 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/MergeBench.cpp ('k') | gm/displacement.cpp » ('j') | gm/imagesource.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bigtileimagefilter.cpp
diff --git a/gm/bigtileimagefilter.cpp b/gm/bigtileimagefilter.cpp
index 7d3d3afeedf25b522a83f45ce57e83e17eddf7aa..1d1e8d6a5d1d4ce4faf3db5fad70e4d8b7ffd7d6 100644
--- a/gm/bigtileimagefilter.cpp
+++ b/gm/bigtileimagefilter.cpp
@@ -54,13 +54,12 @@ protected:
{
SkPaint p;
- SkRect bound = SkRect::MakeWH(SkIntToScalar(kWidth), SkIntToScalar(kHeight));
- sk_sp<SkImageFilter> imageSource(SkImageSource::Create(fRedImage.get()));
- SkAutoTUnref<SkImageFilter> tif(SkTileImageFilter::Create(
- SkRect::MakeWH(SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize)),
- SkRect::MakeWH(SkIntToScalar(kWidth), SkIntToScalar(kHeight)),
- imageSource.get()));
- p.setImageFilter(tif);
+ const SkRect bound = SkRect::MakeIWH(kWidth, kHeight);
+ sk_sp<SkImageFilter> imageSource(SkImageSource::Make(fRedImage));
+
+ p.setImageFilter(SkTileImageFilter::Create(SkRect::MakeIWH(kBitmapSize, kBitmapSize),
f(malita) 2016/03/31 13:26:09 out-of-order ditto
robertphillips 2016/03/31 14:35:53 Done.
+ SkRect::MakeIWH(kWidth, kHeight),
+ imageSource.get()));
canvas->saveLayer(&bound, &p);
canvas->restore();
@@ -69,13 +68,11 @@ protected:
{
SkPaint p2;
- SkRect bound2 = SkRect::MakeWH(SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize));
+ const SkRect bound2 = SkRect::MakeIWH(kBitmapSize, kBitmapSize);
- SkAutoTUnref<SkImageFilter> tif2(SkTileImageFilter::Create(
- SkRect::MakeWH(SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize)),
- SkRect::MakeWH(SkIntToScalar(kBitmapSize), SkIntToScalar(kBitmapSize)),
- nullptr));
- p2.setImageFilter(tif2);
+ p2.setImageFilter(SkTileImageFilter::Create(SkRect::MakeIWH(kBitmapSize, kBitmapSize),
f(malita) 2016/03/31 13:26:09 out-of-order ditto
robertphillips 2016/03/31 14:35:54 Done.
+ SkRect::MakeIWH(kBitmapSize, kBitmapSize),
+ nullptr));
canvas->translate(320, 320);
canvas->saveLayer(&bound2, &p2);
« no previous file with comments | « bench/MergeBench.cpp ('k') | gm/displacement.cpp » ('j') | gm/imagesource.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698