Index: src/images/SkImageDecoder_libwebp.cpp |
diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp |
index 02990258ebe84dbce0f46c5436a95b24b8bfe8b2..49d5bd1cca079653a3d7f014d300bb2638671b3c 100644 |
--- a/src/images/SkImageDecoder_libwebp.cpp |
+++ b/src/images/SkImageDecoder_libwebp.cpp |
@@ -298,20 +298,8 @@ |
return false; |
} |
- SkImageInfo info; |
- info.fWidth = width; |
- info.fHeight = height; |
- info.fColorType = SkBitmapConfigToColorType(config); |
- if (SkToBool(fHasAlpha)) { |
- if (this->getRequireUnpremultipliedColors()) { |
- info.fAlphaType = kUnpremul_SkAlphaType; |
- } else { |
- info.fAlphaType = kPremul_SkAlphaType; |
- } |
- } else { |
- info.fAlphaType = kOpaque_SkAlphaType; |
- } |
- return decodedBitmap->setConfig(info); |
+ return decodedBitmap->setConfig(config, width, height, 0, |
+ fHasAlpha ? kPremul_SkAlphaType : kOpaque_SkAlphaType); |
} |
bool SkWEBPImageDecoder::onBuildTileIndex(SkStreamRewindable* stream, |