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

Unified Diff: src/core/SkOrderedReadBuffer.cpp

Issue 13892009: Use SkError for a bitmap that could not be decoded. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Use more specific name for callback function. Created 7 years, 8 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 | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkOrderedReadBuffer.cpp
diff --git a/src/core/SkOrderedReadBuffer.cpp b/src/core/SkOrderedReadBuffer.cpp
index 2c83ce0ac56d89f4475b0c78c68adef7c13b3068..5a4cf96a9243cfc54203d6121da4f772b6f87ab7 100644
--- a/src/core/SkOrderedReadBuffer.cpp
+++ b/src/core/SkOrderedReadBuffer.cpp
@@ -7,6 +7,7 @@
*/
#include "SkBitmap.h"
+#include "SkErrorInternals.h"
#include "SkOrderedReadBuffer.h"
#include "SkStream.h"
#include "SkTypeface.h"
@@ -179,7 +180,8 @@ void SkOrderedReadBuffer::readBitmap(SkBitmap* bitmap) {
} else {
// This bitmap was encoded when written, but we are unable to decode, possibly due to
// not having a decoder. Use a placeholder bitmap.
- SkDebugf("Could not decode bitmap. Resulting bitmap will be red.\n");
+ SkErrorInternals::SetError(kParseError_SkError,
+ "Could not decode bitmap. Resulting bitmap will be red.");
bitmap->setConfig(SkBitmap::kARGB_8888_Config, width, height);
bitmap->allocPixels();
bitmap->eraseColor(SK_ColorRED);
« no previous file with comments | « no previous file | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698