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

Unified Diff: include/core/SkTLazy.h

Issue 13222004: Trim the copy of the dst made for dst-reading effects using the clip and dev-bounds of draw. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | « no previous file | src/gpu/GrDrawState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTLazy.h
===================================================================
--- include/core/SkTLazy.h (revision 8451)
+++ include/core/SkTLazy.h (working copy)
@@ -81,10 +81,16 @@
bool isValid() const { return NULL != fPtr; }
/**
- * Returns either NULL, or a copy of the object that was passed to
- * set() or the constructor.
+ * Returns the object. This version should only be called when the caller
+ * knows that the object has been initialized.
*/
T* get() const { SkASSERT(this->isValid()); return fPtr; }
+
+ /**
+ * Like above but doesn't assert if object isn't initialized (in which case
+ * NULL is returned).
+ */
+ T* getMaybeNull() const { return fPtr; }
private:
friend void* operator new<T>(size_t, SkTLazy* lazy);
« no previous file with comments | « no previous file | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698