Fix bitmap copy gms
Mark pixels as opaque so copying to 565 continues to work. Bug: skia: Change-Id: Id2b0a8c462fe35f7d1cc2ccc32ca10eda18981c8 Reviewed-on: https://skia-review.googlesource.com/14653 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
This commit is contained in:
parent
a6e976aac8
commit
ec138b40ba
@ -65,7 +65,7 @@ protected:
|
||||
SkScalar vertMargin = 10;
|
||||
|
||||
SkBitmap src;
|
||||
src.allocN32Pixels(40, 40);
|
||||
src.allocN32Pixels(40, 40, kOpaque_SkAlphaType);
|
||||
SkCanvas canvasTmp(src);
|
||||
|
||||
draw_checks(&canvasTmp, 40, 40);
|
||||
|
@ -18,7 +18,7 @@ static void make_bm(SkBitmap* bm) {
|
||||
colorsPM[i] = SkPreMultiplyColor(colors[i]);
|
||||
}
|
||||
bm->allocPixels(SkImageInfo::Make(2, 2, kIndex_8_SkColorType,
|
||||
kPremul_SkAlphaType),
|
||||
kOpaque_SkAlphaType),
|
||||
SkColorTable::Make(colorsPM, 4));
|
||||
|
||||
*bm->getAddr8(0, 0) = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user