A8 bitmaps from JPEG are not opaque.
So do not set them to be. Depends on https://codereview.chromium.org/19185006/ R=reed@google.com Review URL: https://codereview.chromium.org/19613002 git-svn-id: http://skia.googlecode.com/svn/trunk@10158 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
f698c8262d
commit
1f6b995fab
@ -333,7 +333,7 @@ bool SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) {
|
||||
|
||||
if (1 == sampleSize && SkImageDecoder::kDecodeBounds_Mode == mode) {
|
||||
bm->setConfig(config, cinfo.image_width, cinfo.image_height);
|
||||
bm->setIsOpaque(true);
|
||||
bm->setIsOpaque(config != SkBitmap::kA8_Config);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -355,7 +355,7 @@ bool SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) {
|
||||
SkScaledBitmapSampler smpl(cinfo.output_width, cinfo.output_height,
|
||||
recompute_sampleSize(sampleSize, cinfo));
|
||||
bm->setConfig(config, smpl.scaledWidth(), smpl.scaledHeight());
|
||||
bm->setIsOpaque(true);
|
||||
bm->setIsOpaque(config != SkBitmap::kA8_Config);
|
||||
return true;
|
||||
} else {
|
||||
return return_false(cinfo, *bm, "start_decompress");
|
||||
@ -370,7 +370,7 @@ bool SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) {
|
||||
|
||||
SkScaledBitmapSampler sampler(cinfo.output_width, cinfo.output_height, sampleSize);
|
||||
bm->setConfig(config, sampler.scaledWidth(), sampler.scaledHeight());
|
||||
bm->setIsOpaque(true);
|
||||
bm->setIsOpaque(config != SkBitmap::kA8_Config);
|
||||
if (SkImageDecoder::kDecodeBounds_Mode == mode) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user