summaryrefslogtreecommitdiff
path: root/libs/hwui/jni/ImageDecoder.cpp
diff options
context:
space:
mode:
authorLeon Scroggins III <scroggo@google.com>2020-04-02 11:38:48 -0400
committerLeon Scroggins <scroggo@google.com>2020-04-02 16:01:52 +0000
commitf889444fa9d6b0ab505b3ebd3812c70605ca8c96 (patch)
tree9ca3b6a6c0b210a60da55d342b72bdc9944eecab /libs/hwui/jni/ImageDecoder.cpp
parentd8c1e77cf8970e6887dfc42cba797dda9a9fbdf9 (diff)
AImageDecoder: Suppress log messages
Bug: 153071768 Test: AImageDecoderTest For simplicity, I1aff544e8d6932b9ed0931a00da66a0aba6cd536 made ImageDecoder skip specifying kOpaque when setting the SkImageInfo for decoding. For some formats (e.g. jpeg and heif), this results in a log message: "Warning: an opaque image should be decoded as opaque - it is being decoded as non-opaque, which will draw slower" This isn't relevant to AImageDecoder, which doesn't let you specify kOpaque or not (since the intent is not to create an SkBitmap for Skia). Now that ImageDecoder specifies kOpaque properly, the JNI code no longer needs to correct it. Replace another opacity check with ::opaque() for simplicity. Change-Id: I7c270d9b9db61a61a338f40b056ce5d23a56e14d
Diffstat (limited to 'libs/hwui/jni/ImageDecoder.cpp')
-rw-r--r--libs/hwui/jni/ImageDecoder.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/libs/hwui/jni/ImageDecoder.cpp b/libs/hwui/jni/ImageDecoder.cpp
index b6b378539bd0..41d939bd6373 100644
--- a/libs/hwui/jni/ImageDecoder.cpp
+++ b/libs/hwui/jni/ImageDecoder.cpp
@@ -305,9 +305,6 @@ static jobject ImageDecoder_nDecodeBitmap(JNIEnv* env, jobject /*clazz*/, jlong
}
SkImageInfo bitmapInfo = decoder->getOutputInfo();
- if (decoder->opaque()) {
- bitmapInfo = bitmapInfo.makeAlphaType(kOpaque_SkAlphaType);
- }
if (asAlphaMask && colorType == kGray_8_SkColorType) {
bitmapInfo = bitmapInfo.makeColorType(kAlpha_8_SkColorType);
}