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

Unified Diff: gm/imagetoyuvplanes.cpp

Issue 1817383002: switch surface to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « gm/imagesource2.cpp ('k') | gm/lcdblendmodes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagetoyuvplanes.cpp
diff --git a/gm/imagetoyuvplanes.cpp b/gm/imagetoyuvplanes.cpp
index ddead1be42cea4b242f3fd41be2e15569eed1017..63d3fa92dafe8cfe1051e2757c9d9000197e19ad 100644
--- a/gm/imagetoyuvplanes.cpp
+++ b/gm/imagetoyuvplanes.cpp
@@ -13,12 +13,12 @@
#include "SkImage.h"
static sk_sp<SkImage> create_image(GrContext* context, int width, int height) {
- SkAutoTUnref<SkSurface> surface;
+ sk_sp<SkSurface> surface;
SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
if (context) {
- surface.reset(SkSurface::NewRenderTarget(context, SkBudgeted::kYes, info, 0));
+ surface = SkSurface::MakeRenderTarget(context, SkBudgeted::kYes, info);
} else {
- surface.reset(SkSurface::NewRaster(info));
+ surface = SkSurface::MakeRaster(info);
}
if (!surface) {
return nullptr;
« no previous file with comments | « gm/imagesource2.cpp ('k') | gm/lcdblendmodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698