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:
Matt Sarett 2017-04-28 16:06:34 -04:00 committed by Skia Commit-Bot
parent a6e976aac8
commit ec138b40ba
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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;