Index: src/core/SkBitmap.cpp |
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp |
index 9a5f1f26dcacaf6faa8310b4424ef83640491426..2464d5d5967409f77d87ce7cbf26cc5e4b82ab4d 100644 |
--- a/src/core/SkBitmap.cpp |
+++ b/src/core/SkBitmap.cpp |
@@ -1601,12 +1601,16 @@ void SkBitmap::validate() const { |
SkASSERT(fPixelRef); |
SkASSERT(fPixelLockCount > 0); |
SkASSERT(fPixelRef->isLocked()); |
+#if !defined(SK_SUPPORT_LEGACY_ONLOCKPIXELS) |
SkASSERT(fPixelRef->rowBytes() == fRowBytes); |
+#endif |
SkASSERT(fPixelRefOrigin.fX >= 0); |
SkASSERT(fPixelRefOrigin.fY >= 0); |
SkASSERT(fPixelRef->info().fWidth >= (int)fWidth + fPixelRefOrigin.fX); |
SkASSERT(fPixelRef->info().fHeight >= (int)fHeight + fPixelRefOrigin.fY); |
+#if !defined(SK_SUPPORT_LEGACY_ONLOCKPIXELS) |
SkASSERT(fPixelRef->rowBytes() >= fWidth * fBytesPerPixel); |
+#endif |
} else { |
SkASSERT(NULL == fColorTable); |
} |