aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkTLazy.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-27 17:39:46 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-27 17:39:46 +0000
commit6f954b956fc5c36ebbcac404d93ba9349fb0355f (patch)
tree145d10cea5f1843523d9e7e30f9f35dd031f6f91 /include/core/SkTLazy.h
parent939560b87a392911c5aeaacdbd1f8d26fe4845ad (diff)
Use SkTLazy to hold path in SkClipStack::Element
R=reed@google.com, robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/178583002 git-svn-id: http://skia.googlecode.com/svn/trunk@13610 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkTLazy.h')
-rw-r--r--include/core/SkTLazy.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/core/SkTLazy.h b/include/core/SkTLazy.h
index 2147b6681f..a291e22a13 100644
--- a/include/core/SkTLazy.h
+++ b/include/core/SkTLazy.h
@@ -75,6 +75,16 @@ public:
}
/**
+ * Destroy the lazy object (if it was created via init() or set())
+ */
+ void reset() {
+ if (this->isValid()) {
+ fPtr->~T();
+ fPtr = NULL;
+ }
+ }
+
+ /**
* Returns true if a valid object has been initialized in the SkTLazy,
* false otherwise.
*/