diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-07 14:25:44 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-07 14:25:44 +0000 |
commit | e763951a5c0a9130eb6a7a9f05ab848eb9b3acf8 (patch) | |
tree | 3558faa6f63ad1b4384a9aa13abc50984def96c2 | |
parent | 87873f03e9afe43b64f94e6a14792808b7ae6584 (diff) |
document OwnDeviceCanvas
git-svn-id: http://skia.googlecode.com/svn/trunk@4970 2bbb7eff-a529-9590-31e7-b0007b416f81
-rwxr-xr-x | src/effects/SkTestImageFilters.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/effects/SkTestImageFilters.cpp b/src/effects/SkTestImageFilters.cpp index 0dd360b476..2633b0959d 100755 --- a/src/effects/SkTestImageFilters.cpp +++ b/src/effects/SkTestImageFilters.cpp @@ -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) { |