diff options
-rw-r--r-- | src/images/SkImageDecoder_libwebp.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp index e623f376d7..95b9a97878 100644 --- a/src/images/SkImageDecoder_libwebp.cpp +++ b/src/images/SkImageDecoder_libwebp.cpp @@ -21,7 +21,6 @@ #include "SkStream.h" #include "SkTemplates.h" #include "SkUtils.h" -#include "SkTScopedPtr.h" // A WebP decoder only, on top of (subset of) libwebp // For more information on WebP image format, and libwebp library, see: @@ -344,13 +343,12 @@ bool SkWEBPImageDecoder::onDecodeSubset(SkBitmap* decodedBitmap, (is_config_compatible(*decodedBitmap) && (decodedBitmap->width() == width) && (decodedBitmap->height() == height))); - SkTScopedPtr<SkBitmap> adb; + + SkBitmap tmpBitmap; SkBitmap *bitmap = decodedBitmap; if (!directDecode) { - // allocates a temp bitmap - bitmap = new SkBitmap; - adb.reset(bitmap); + bitmap = &tmpBitmap; } if (bitmap->isNull()) { |