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

Unified Diff: gm/SkLinearBitmapPipelineGM.cpp

Issue 1810813003: update callsites for Make image factories (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: start to take advantage of sk_sp drawImage 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 | « example/HelloWorld.cpp ('k') | gm/all_bitmap_configs.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/SkLinearBitmapPipelineGM.cpp
diff --git a/gm/SkLinearBitmapPipelineGM.cpp b/gm/SkLinearBitmapPipelineGM.cpp
index e93d2ac4c3b869218e8e8dbc0713f84abf416805..51fd2cfd46eea6ee7360d62c0b01cf7eef451629 100644
--- a/gm/SkLinearBitmapPipelineGM.cpp
+++ b/gm/SkLinearBitmapPipelineGM.cpp
@@ -57,8 +57,7 @@ static void draw_rect_orig(SkCanvas* canvas, const SkRect& r, SkColor c, const S
SkImageInfo info = SkImageInfo::MakeN32Premul(ir.width(), ir.height(), kLinear_SkColorProfileType);
- SkAutoTUnref<SkImage> image{SkImage::NewRasterCopy(
- info, pmsrc.addr32(), pmsrc.rowBytes())};
+ sk_sp<SkImage> image(SkImage::MakeRasterCopy(SkPixmap(info, pmsrc.addr32(), pmsrc.rowBytes())));
SkPaint paint;
int32_t storage[300];
paint.setShader(image->makeShader(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode));
« no previous file with comments | « example/HelloWorld.cpp ('k') | gm/all_bitmap_configs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698