Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: include/core/SkTLazy.h

Issue 178583002: Use SkTLazy to hold path in SkClipStack::Element (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add comment Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkClipStack.h ('k') | src/core/SkClipStack.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTLazy.h
diff --git a/include/core/SkTLazy.h b/include/core/SkTLazy.h
index 2147b6681fa601dff47b8554eeea58fc5c70fc1e..a291e22a137692226425776dc9efaafb860836bb 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.
*/
« no previous file with comments | « include/core/SkClipStack.h ('k') | src/core/SkClipStack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698