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

Unified Diff: dm/DMSrcSink.cpp

Issue 1260673002: SkScaledCodec class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move Jpeg Swizzler to ScanlineDecoder Created 5 years, 4 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 | « dm/DM.cpp ('k') | gyp/codec.gyp » ('j') | gyp/codec.gyp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index f555b9fcbdba78f485e47b9baf4be67d2fa1d83c..1907bf4767575cfef8059e6cbf70517153d429c5 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -27,6 +27,7 @@
#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");
@@ -84,7 +85,7 @@ Error CodecSrc::draw(SkCanvas* canvas) const {
if (!encoded) {
return SkStringPrintf("Couldn't read %s.", fPath.c_str());
}
- SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded));
+ SkAutoTDelete<SkCodec> codec(SkScaledCodec::NewFromData(encoded));
if (NULL == codec.get()) {
return SkStringPrintf("Couldn't create codec for %s.", fPath.c_str());
}
@@ -446,7 +447,7 @@ Error CodecSrc::draw(SkCanvas* canvas) const {
SkISize CodecSrc::size() const {
SkAutoTUnref<SkData> encoded(SkData::NewFromFileName(fPath.c_str()));
- SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded));
+ SkAutoTDelete<SkCodec> codec(SkScaledCodec::NewFromData(encoded));
if (NULL != codec) {
SkISize size = codec->getScaledDimensions(fScale);
return size;
« no previous file with comments | « dm/DM.cpp ('k') | gyp/codec.gyp » ('j') | gyp/codec.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698