Index: include/core/SkPixelRef.h |
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h |
index a67855de5fbf03fa8872f9f02dd6ac75e1b3007c..1dc01f79abb1f650dd0688bb84367d2c3f4d38fa 100644 |
--- a/include/core/SkPixelRef.h |
+++ b/include/core/SkPixelRef.h |
@@ -19,20 +19,6 @@ |
#include "SkString.h" |
#include "SkTDArray.h" |
-#ifdef SK_DEBUG |
- /** |
- * Defining SK_IGNORE_PIXELREF_SETPRELOCKED will force all pixelref |
- * subclasses to correctly handle lock/unlock pixels. For performance |
- * reasons, simple malloc-based subclasses call setPreLocked() to skip |
- * the overhead of implementing these calls. |
- * |
- * This build-flag disables that optimization, to add in debugging our |
- * call-sites, to ensure that they correctly balance their calls of |
- * lock and unlock. |
- */ |
-// #define SK_IGNORE_PIXELREF_SETPRELOCKED |
-#endif |
- |
class SkColorTable; |
class SkData; |
struct SkIRect; |
@@ -385,6 +371,9 @@ private: |
void restoreMutability(); |
friend class SkSurface_Raster; // For the two methods above. |
+ bool isPreLocked() const { return fPreLocked; } |
+ friend class SkImage_Raster; |
+ |
// When copying a bitmap to another with the same shape and config, we can safely |
// clone the pixelref generation ID too, which makes them equivalent under caching. |
friend class SkBitmap; // only for cloneGenID |