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

Unified Diff: src/core/SkBitmap.cpp

Issue 140903002: Hide bitmap rowbyes assert when LEGACY_ONLOCKPIXELS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: format Created 6 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698