Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 6f6664f27ce2266bd12156f1ae973cada399ec25..89629491663406bde9c50f54f2e0e90ef319428c 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -55,10 +55,7 @@ Error ImageSrc::draw(SkCanvas* canvas) const { |
if (!codec) { |
return SkStringPrintf("Couldn't decode %s.", fPath.c_str()); |
} |
- SkImageInfo info; |
- if (!codec->getInfo(&info)) { |
- return SkStringPrintf("Couldn't getInfo %s.", fPath.c_str()); |
- } |
+ SkImageInfo info = codec->getInfo(); |
scroggo
2015/03/19 13:27:46
Yay! FYI: this (and the code in ImageSrc::size())
reed1
2015/03/19 15:20:45
Acknowledged.
|
info = info.makeColorType(dstColorType); |
if (info.alphaType() == kUnpremul_SkAlphaType) { |
// FIXME: Currently we cannot draw unpremultiplied sources. |
@@ -146,11 +143,7 @@ SkISize ImageSrc::size() const { |
if (!codec) { |
return SkISize::Make(0,0); |
} |
- SkImageInfo info; |
- if (!codec->getInfo(&info)) { |
- return SkISize::Make(0,0); |
- } |
- return info.dimensions(); |
+ return codec->getInfo().dimensions(); |
} else { |
SkBitmap bitmap; |
if (!encoded || !SkImageDecoder::DecodeMemory(encoded->data(), |