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

Unified Diff: src/codec/SkCodec.cpp

Issue 1564843002: Fix some SkCodecPrintfs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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/codec/SkCodec.cpp
diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp
index 87a7ded7dd6bd2e0c0a6da19de1d9782a50553c3..0736f2a2691698180399971b3337aeccec5fc050 100644
--- a/src/codec/SkCodec.cpp
+++ b/src/codec/SkCodec.cpp
@@ -62,13 +62,16 @@ SkCodec* SkCodec::NewFromStream(SkStream* stream,
// we trust the caller to use a large enough buffer.
if (0 == bytesRead) {
- SkCodecPrintf("Could not peek!\n");
+ // TODO: After implementing peek in CreateJavaOutputStreamAdaptor.cpp, this
+ // printf could be useful to notice failures.
+ // SkCodecPrintf("Encoded image data failed to peek!\n");
+
// It is possible the stream does not support peeking, but does support
// rewinding.
// Attempt to read() and pass the actual amount read to the decoder.
bytesRead = stream->read(buffer, bytesToRead);
if (!stream->rewind()) {
- SkCodecPrintf("Could not rewind!\n");
+ SkCodecPrintf("Encoded image data could not peek or rewind to determine format!\n");
scroggo 2016/01/06 16:57:52 I could imagine making SkCodecPrintf add something
msarett 2016/01/06 17:11:27 Yes I agree.
return nullptr;
}
}
« 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