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

Unified Diff: include/core/SkCanvas.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 | « include/core/SkBitmapDevice.h ('k') | include/core/SkDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index d551031739785f857538f161a605b6d03e079d68..bdb2eb0706bcf83b24ec91d7d8e3d6d45bd519a7 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -186,7 +186,10 @@ public:
* inherits the properties of the surface that owns this canvas. If this canvas has no parent
* surface, then the new surface is created with default properties.
*/
- SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps* = NULL);
+ sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps* = nullptr);
+#ifdef SK_SUPPORT_LEGACY_NEW_SURFACE_API
+ SkSurface* newSurface(const SkImageInfo& info, const SkSurfaceProps* props = NULL);
+#endif
/**
* Return the GPU context of the device that is associated with the canvas.
@@ -1252,7 +1255,7 @@ public:
protected:
// default impl defers to getDevice()->newSurface(info)
- virtual SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&);
+ virtual sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&);
// default impl defers to its device
virtual bool onPeekPixels(SkPixmap*);
« no previous file with comments | « include/core/SkBitmapDevice.h ('k') | include/core/SkDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698