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

Unified Diff: gm/SkLinearBitmapPipelineGM.cpp

Issue 1785473002: SkImage now has makeShader to return sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use build guard for impl of newShader 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/SkLinearBitmapPipelineBench.cpp ('k') | gm/colorfilterimagefilter.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 d3a143c5c10ffdf3e65ef44ae29ddd57d769adfa..e93d2ac4c3b869218e8e8dbc0713f84abf416805 100644
--- a/gm/SkLinearBitmapPipelineGM.cpp
+++ b/gm/SkLinearBitmapPipelineGM.cpp
@@ -61,13 +61,12 @@ static void draw_rect_orig(SkCanvas* canvas, const SkRect& r, SkColor c, const S
info, pmsrc.addr32(), pmsrc.rowBytes())};
SkPaint paint;
int32_t storage[300];
- SkShader* shader = image->newShader(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode);
+ paint.setShader(image->makeShader(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode));
if (useBilerp) {
paint.setFilterQuality(SkFilterQuality::kLow_SkFilterQuality);
} else {
paint.setFilterQuality(SkFilterQuality::kNone_SkFilterQuality);
}
- paint.setShader(shader)->unref();
const SkShader::ContextRec rec(paint, *mat, nullptr,
SkBlitter::PreferredShaderDest(pmsrc.info()));
SkASSERT(paint.getShader()->contextSize(rec) <= sizeof(storage));
« no previous file with comments | « bench/SkLinearBitmapPipelineBench.cpp ('k') | gm/colorfilterimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698