aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-16 15:47:06 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-16 15:47:06 +0000
commitf7ba41321b16ad8df611fa07e9ae48fe8a30a0bb (patch)
tree9ee5216715610df8904fc345e41e2f9e9dd5ca67 /src
parent3aa7a02b65d3798b819abd7c12a0327a6adcabcd (diff)
Hide bitmap rowbyes assert when LEGACY_ONLOCKPIXELS
Motivation: without this, we break Blink. BUG=skia: NOTREECHECKS=true NOTRY=true R=robertphillips@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/140903002 git-svn-id: http://skia.googlecode.com/svn/trunk@13107 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/core/SkBitmap.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 9a5f1f26dc..2464d5d596 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);
}