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

Unified Diff: bench/SkLinearBitmapPipelineBench.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 | « bench/SKPBench.cpp ('k') | dm/DMSrcSink.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 0c60eed302b676733463d3aaff664c1cc2dc3877..7d2d4a54ddf4ef8c6e1ee2cc6e568f3ae8354d01 100644
--- a/bench/SkLinearBitmapPipelineBench.cpp
+++ b/bench/SkLinearBitmapPipelineBench.cpp
@@ -173,9 +173,8 @@ struct SkBitmapFPOrigShader : public CommonBitmapFPBenchmark {
void onPreDraw(SkCanvas* c) override {
CommonBitmapFPBenchmark::onPreDraw(c);
- SkImage* image = SkImage::NewRasterCopy(
- fInfo, fBitmap.get(), sizeof(SkPMColor) * fSrcSize.fWidth);
- fImage.reset(image);
+ fImage = SkImage::MakeRasterCopy(
+ SkPixmap(fInfo, fBitmap.get(), sizeof(SkPMColor) * fSrcSize.fWidth));
fPaint.setShader(fImage->makeShader(fXTile, fYTile));
if (fUseBilerp) {
fPaint.setFilterQuality(SkFilterQuality::kLow_SkFilterQuality);
@@ -209,7 +208,7 @@ struct SkBitmapFPOrigShader : public CommonBitmapFPBenchmark {
ctx->~Context();
}
SkPaint fPaint;
- SkAutoTUnref<SkImage> fImage;
+ sk_sp<SkImage> fImage;
};
static SkISize srcSize = SkISize::Make(120, 100);
« no previous file with comments | « bench/SKPBench.cpp ('k') | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698