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

Unified Diff: src/images/SkImageDecoder_libico.cpp

Issue 12834012: Update code to use helper function for better readability/searching. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 9 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 | « src/images/SkImageDecoder_libbmp.cpp ('k') | src/ports/SkFontHost_FreeType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libico.cpp
diff --git a/src/images/SkImageDecoder_libico.cpp b/src/images/SkImageDecoder_libico.cpp
index 14f575babab4162f9db3706e6350af9479692a1c..ffc59e0003e1ca6706f3ea985cab37d680fdc432 100644
--- a/src/images/SkImageDecoder_libico.cpp
+++ b/src/images/SkImageDecoder_libico.cpp
@@ -75,7 +75,7 @@ static int calculateRowBytesFor8888(int w, int bitCount)
bool SkICOImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode)
{
- size_t length = stream->read(NULL, 0);
+ size_t length = stream->getLength();
SkAutoMalloc autoMal(length);
unsigned char* buf = (unsigned char*)autoMal.get();
if (stream->read((void*)buf, length) != length) {
« no previous file with comments | « src/images/SkImageDecoder_libbmp.cpp ('k') | src/ports/SkFontHost_FreeType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698