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

Unified Diff: include/core/SkBitmap.h

Issue 72603005: Guard against most unintentionally ephemeral SkAutoFoo instantiations. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: undo autoasciitolc Created 7 years, 1 month 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 | include/core/SkCanvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkBitmap.h
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index dd2d2cfd7f10a255c2ba463af54191ad450e2492..d9749f04c4393e36170906e0981fbccb134d00b2 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -730,6 +730,7 @@ private:
const SkBitmap& fBitmap;
bool fDidLock;
};
+#define SkAutoLockPixels(...) SK_REQUIRE_LOCAL_VAR(SkAutoLockPixels)
/** Helper class that performs the lock/unlockColors calls on a colortable.
The destructor will call unlockColors(false) if it has a bitmap's colortable
@@ -783,6 +784,7 @@ private:
SkColorTable* fCTable;
const SkPMColor* fColors;
};
+#define SkAutoLockColors(...) SK_REQUIRE_LOCAL_VAR(SkAutoLockColors)
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « no previous file | include/core/SkCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698