diff options
author | 2012-07-30 21:03:46 +0000 | |
---|---|---|
committer | 2012-07-30 21:03:46 +0000 | |
commit | 9ea5a3bc7361cb88d37280b5922fba9430fed328 (patch) | |
tree | a16d1193b8b30ad47cfd578207335b5837765060 /include/core | |
parent | 97efada074e4806479f1350ab1508939c2fdcb53 (diff) |
change SkSurface::newCanvas() to getCanvas(), and redefine its life-cycle to be
a single canvas for the lifetime of the surface.
Get a playback copy from the src picture, so we can continue to record into the
original picture.
git-svn-id: http://skia.googlecode.com/svn/trunk@4842 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkSurface.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h index b399a2fe92..69889e5adc 100644 --- a/include/core/SkSurface.h +++ b/include/core/SkSurface.h @@ -71,13 +71,12 @@ public: void notifyContentChanged(); /** - * Return a canvas that will draw into this surface. - * - * LIFECYCLE QUESTIONS - * 1. Is this owned by the surface or the caller? - * 2. Can the caller get a 2nd canvas, or reset the state of the first? + * Return a canvas that will draw into this surface. This will always + * return the same canvas for a given surface, and is manged/owned by the + * surface. It should not be used when its parent surface has gone out of + * scope. */ - SkCanvas* newCanvas(); + SkCanvas* getCanvas(); /** * Return a new surface that is "compatible" with this one, in that it will |