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

Unified Diff: include/core/SkPixelRef.h

Issue 112783004: ensure that we call onUnlock only when we onLock succeeded (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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/core/SkPixelRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPixelRef.h
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h
index b87b0dc114b34958ff36f93ea3d464320334ae60..f50cafafbd6dc3f302c1e7a4190abb4902ac1235 100644
--- a/include/core/SkPixelRef.h
+++ b/include/core/SkPixelRef.h
@@ -244,10 +244,15 @@ protected:
acquire a mutex for thread safety, so this method need not do that.
*/
virtual void* onLockPixels(SkColorTable**) = 0;
- /** Called when the lock count goes from 1 to 0. The caller will have
- already acquire a mutex for thread safety, so this method need not do
- that.
- */
+
+ /**
+ * Called when the lock count goes from 1 to 0. The caller will have
+ * already acquire a mutex for thread safety, so this method need not do
+ * that.
+ *
+ * If the previous call to onLockPixels failed (i.e. returned NULL), then
+ * the onUnlockPixels will NOT be called.
+ */
virtual void onUnlockPixels() = 0;
/** Default impl returns true */
« no previous file with comments | « no previous file | src/core/SkPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698