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

Unified Diff: example/HelloWorld.h

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 | « dm/DMSrcSink.cpp ('k') | gm/bigtileimagefilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: example/HelloWorld.h
diff --git a/example/HelloWorld.h b/example/HelloWorld.h
index ef4e417ad62b60b5a93b1ed6f2f80955f8bb02a5..619ee7cb4df317b32014f049bcad3924d9e5a376 100644
--- a/example/HelloWorld.h
+++ b/example/HelloWorld.h
@@ -36,11 +36,11 @@ protected:
SkSurface* createSurface() override {
SkSurfaceProps props(INHERITED::getSurfaceProps());
if (kGPU_DeviceType == fType) {
- return SkSurface::NewRenderTargetDirect(fRenderTarget, &props);
+ return SkSurface::MakeRenderTargetDirect(fRenderTarget, &props).release();
}
static const SkImageInfo info = SkImageInfo::MakeN32Premul(
SkScalarRoundToInt(this->width()), SkScalarRoundToInt(this->height()));
- return fSurface = SkSurface::NewRaster(info, &props);
+ return fSurface = SkSurface::MakeRaster(info, &props).release();
}
void draw(SkCanvas* canvas) override;
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | gm/bigtileimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698