document OwnDeviceCanvas
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 7 Aug 2012 14:25:44 +0000 (14:25 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 7 Aug 2012 14:25:44 +0000 (14:25 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@4970 2bbb7eff-a529-9590-31e7-b0007b416f81

src/effects/SkTestImageFilters.cpp

index 0dd360b..2633b09 100755 (executable)
@@ -2,6 +2,13 @@
 #include "SkCanvas.h"
 #include "SkDevice.h"
 
+// Simple helper canvas that "takes ownership" of the provided device, so that
+// when this canvas goes out of scope, so will its device. Could be replaced
+// with the following:
+//
+//  SkCanvas canvas(device);
+//  SkAutoTUnref<SkDevice> aur(device);
+//
 class OwnDeviceCanvas : public SkCanvas {
 public:
     OwnDeviceCanvas(SkDevice* device) : SkCanvas(device) {