From 02076831575a6d4706e1aa0c14a25508f173de88 Mon Sep 17 00:00:00 2001 From: "scroggo@google.com" Date: Mon, 16 Dec 2013 20:02:03 +0000 Subject: [PATCH] Remove an assert that assumes too much. The resulting bitmap may look funny, but it may not be our bug, and the assert is making it difficult to use SKP files. TBR=robertphillips@google.com, rmistry@google.com, bensong@google.com BUG=skia:1905 Review URL: https://codereview.chromium.org/111463006 git-svn-id: http://skia.googlecode.com/svn/trunk@12696 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkOrderedReadBuffer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/SkOrderedReadBuffer.cpp b/src/core/SkOrderedReadBuffer.cpp index 31841182b9..69c60cbe09 100644 --- a/src/core/SkOrderedReadBuffer.cpp +++ b/src/core/SkOrderedReadBuffer.cpp @@ -226,9 +226,13 @@ void SkOrderedReadBuffer::readBitmap(SkBitmap* bitmap) { } // This case can only be reached if extractSubset was called, so - // the recorded width and height must be smaller than (or equal to + // the recorded width and height must be smaller than or equal to // the encoded width and height. - SkASSERT(width <= bitmap->width() && height <= bitmap->height()); + // FIXME (scroggo): This assert assumes that our decoder and the + // sources encoder agree on the width and height which may not + // always be the case. Removing until it can be investigated + // further. + //SkASSERT(width <= bitmap->width() && height <= bitmap->height()); SkBitmap subsetBm; SkIRect subset = SkIRect::MakeXYWH(xOffset, yOffset, width, height);