diff options
author | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-28 15:50:13 +0000 |
---|---|---|
committer | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-28 15:50:13 +0000 |
commit | 826b41525b5d4e67c7777b41da1435f921a47cde (patch) | |
tree | ccd08e2ed8dc5b7aa51fa6a8268cdef7c5082a1d | |
parent | 5bd26d32ab85d09dccabbdc6dd944ef36ac32423 (diff) |
Only print error message in debug mode.
Currently, PictureTest runs a test of recording a bad bitmap to a
picture and then replaying the picture. We assert at the record
step in debug mode, so the test only runs in release, to ensure that
we can still play back a picture, even if it has a bad bitmap. Silence
the error message in release, so our test doesn't appear to error
(since it is actually working as desired).
Review URL: https://codereview.chromium.org/12315138
git-svn-id: http://skia.googlecode.com/svn/trunk@7897 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/core/SkPicturePlayback.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/SkPicturePlayback.h b/src/core/SkPicturePlayback.h index 6acc0ae508..b0af6942bc 100644 --- a/src/core/SkPicturePlayback.h +++ b/src/core/SkPicturePlayback.h @@ -96,7 +96,9 @@ private: const SkBitmap& getBitmap(SkReader32& reader) { const int index = reader.readInt(); if (SkBitmapHeap::INVALID_SLOT == index) { +#ifdef SK_DEBUG SkDebugf("An invalid bitmap was recorded!\n"); +#endif return fBadBitmap; } return (*fBitmaps)[index]; |