diff options
author | msarett <msarett@google.com> | 2015-03-16 11:07:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-16 11:07:02 -0700 |
commit | dfdec78a5d02e8690998741a9fe5b71a08ca3232 (patch) | |
tree | 477847bdf2341f6d2d20d40c973f569b7b880c39 /dm | |
parent | d18475854ce232de71c5463e0654f459d4abfd43 (diff) |
Revert "Implementation of image decoding for bmp files, in accordance with the new API."
This reverts commit 3675874468de7228944ce21922e6ec863f5f2310.
BUG=skia:
NOTREECHECKS=true
NOTRY=true
TBR=
Review URL: https://codereview.chromium.org/1012873002
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DMSrcSink.cpp | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 6f6664f27c..91f4e238c2 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -141,27 +141,15 @@ Error ImageSrc::draw(SkCanvas* canvas) const { SkISize ImageSrc::size() const { SkAutoTUnref<SkData> encoded(SkData::NewFromFileName(fPath.c_str())); - if (FLAGS_codec) { - SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded)); - if (!codec) { - return SkISize::Make(0,0); - } - SkImageInfo info; - if (!codec->getInfo(&info)) { - return SkISize::Make(0,0); - } - return info.dimensions(); - } else { - SkBitmap bitmap; - if (!encoded || !SkImageDecoder::DecodeMemory(encoded->data(), - encoded->size(), - &bitmap, - kUnknown_SkColorType, - SkImageDecoder::kDecodeBounds_Mode)) { - return SkISize::Make(0,0); - } - return bitmap.dimensions(); + SkBitmap bitmap; + if (!encoded || !SkImageDecoder::DecodeMemory(encoded->data(), + encoded->size(), + &bitmap, + kUnknown_SkColorType, + SkImageDecoder::kDecodeBounds_Mode)) { + return SkISize::Make(0,0); } + return bitmap.dimensions(); } Name ImageSrc::name() const { |