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

Unified Diff: bench/SkLinearBitmapPipelineBench.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 | « no previous file | gm/SkLinearBitmapPipelineGM.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SkLinearBitmapPipelineBench.cpp
diff --git a/bench/SkLinearBitmapPipelineBench.cpp b/bench/SkLinearBitmapPipelineBench.cpp
index 660245ebef2179724e10858ec3584c725784edee..0c60eed302b676733463d3aaff664c1cc2dc3877 100644
--- a/bench/SkLinearBitmapPipelineBench.cpp
+++ b/bench/SkLinearBitmapPipelineBench.cpp
@@ -176,13 +176,12 @@ struct SkBitmapFPOrigShader : public CommonBitmapFPBenchmark {
SkImage* image = SkImage::NewRasterCopy(
fInfo, fBitmap.get(), sizeof(SkPMColor) * fSrcSize.fWidth);
fImage.reset(image);
- SkShader* shader = fImage->newShader(fXTile, fYTile);
+ fPaint.setShader(fImage->makeShader(fXTile, fYTile));
if (fUseBilerp) {
fPaint.setFilterQuality(SkFilterQuality::kLow_SkFilterQuality);
} else {
fPaint.setFilterQuality(SkFilterQuality::kNone_SkFilterQuality);
}
- fPaint.setShader(shader)->unref();
}
void onPostDraw(SkCanvas*) override {
« no previous file with comments | « no previous file | gm/SkLinearBitmapPipelineGM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698