From dfdec78a5d02e8690998741a9fe5b71a08ca3232 Mon Sep 17 00:00:00 2001 From: msarett Date: Mon, 16 Mar 2015 11:07:02 -0700 Subject: 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 --- dm/DMSrcSink.cpp | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'dm') 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 encoded(SkData::NewFromFileName(fPath.c_str())); - if (FLAGS_codec) { - SkAutoTDelete 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 { -- cgit v1.2.3