From ea4ac97dec2eb291139bd906939e0d2e05cdd7ef Mon Sep 17 00:00:00 2001 From: "mike@reedtribe.org" Date: Tue, 26 Apr 2011 11:48:33 +0000 Subject: make SkDeviceFactory reference counted git-svn-id: http://skia.googlecode.com/svn/trunk@1180 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkCanvas.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/core/SkCanvas.h') diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 6b2ee10e75..b1222eb874 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -126,12 +126,15 @@ public: SkDevice* setBitmapDevice(const SkBitmap& bitmap, bool forLayer = false); /** - * Return the current device factory, or NULL. + * Return the current device factory, or NULL. The reference count of + * the returned factory is not changed. */ SkDeviceFactory* getDeviceFactory() const { return fDeviceFactory; } /** - * Replace any existing factory with the specified factory. + * Replace any existing factory with the specified factory, unrefing the + * previous (if any), and refing the new one (if any). For convenience, + * the factory parameter is also returned. */ SkDeviceFactory* setDeviceFactory(SkDeviceFactory*); -- cgit v1.2.3