Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 9826f978224d74dfc5f543164fc84bb0121f7a02..f555b9fcbdba78f485e47b9baf4be67d2fa1d83c 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -27,7 +27,6 @@ |
#include "SkScanlineDecoder.h" |
#include "SkStream.h" |
#include "SkXMLWriter.h" |
-#include "SkScaledCodec.h" |
DEFINE_bool(multiPage, false, "For document-type backends, render the source" |
" into multiple pages"); |
@@ -85,13 +84,9 @@ |
if (!encoded) { |
return SkStringPrintf("Couldn't read %s.", fPath.c_str()); |
} |
- SkAutoTDelete<SkCodec> codec(SkScaledCodec::NewFromData(encoded)); |
+ SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded)); |
if (NULL == codec.get()) { |
- // scaledCodec not supported, try normal codec |
- codec.reset(SkCodec::NewFromData(encoded)); |
- if (NULL == codec.get()) { |
- return SkStringPrintf("Couldn't create codec for %s.", fPath.c_str()); |
- } |
+ return SkStringPrintf("Couldn't create codec for %s.", fPath.c_str()); |
} |
// Choose the color type to decode to |
@@ -451,16 +446,13 @@ |
SkISize CodecSrc::size() const { |
SkAutoTUnref<SkData> encoded(SkData::NewFromFileName(fPath.c_str())); |
- SkAutoTDelete<SkCodec> codec(SkScaledCodec::NewFromData(encoded)); |
- if (NULL == codec) { |
- // scaledCodec not supported, try regular codec |
- codec.reset(SkCodec::NewFromData(encoded)); |
- if (NULL == codec) { |
- return SkISize::Make(0, 0); |
- } |
- } |
- SkISize size = codec->getScaledDimensions(fScale); |
- return size; |
+ SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded)); |
+ if (NULL != codec) { |
+ SkISize size = codec->getScaledDimensions(fScale); |
+ return size; |
+ } else { |
+ return SkISize::Make(0, 0); |
+ } |
} |
Name CodecSrc::name() const { |