Use an opaque bitmap in checked DrawMode

This commit is contained in:
David Capello 2018-01-26 19:02:17 -03:00
parent 1b12f5ccbd
commit c1342a7029

View File

@ -167,8 +167,10 @@ public:
m_paint.setBlendMode(SkBlendMode::kSrcOver);
{
SkBitmap bitmap;
if (!bitmap.tryAllocPixels(SkImageInfo::MakeN32Premul(8, 8, colorSpace())))
if (!bitmap.tryAllocPixels(
SkImageInfo::MakeN32(8, 8, kOpaque_SkAlphaType, colorSpace()))) {
throw base::Exception("Cannot create temporary Skia surface");
}
{
SkPMColor A = SkPreMultiplyARGB(gfx::geta(a), gfx::getr(a), gfx::getg(a), gfx::getb(a));