Bug 987010 - Ignore alpha in Skia BGRX source surfaces - r=gwright

This commit is contained in:
James Willcox 2014-04-17 17:01:23 -04:00
Родитель 2245082f22
Коммит 73b9d741e9
1 изменённых файлов: 1 добавлений и 6 удалений

Просмотреть файл

@ -73,12 +73,7 @@ SourceSurfaceSkia::InitFromData(unsigned char* aData,
}
if (aFormat == SurfaceFormat::B8G8R8X8) {
mBitmap.lockPixels();
// We have to manually set the A channel to be 255 as Skia doesn't understand BGRX
ConvertBGRXToBGRA(reinterpret_cast<unsigned char*>(mBitmap.getPixels()), aSize, mBitmap.rowBytes());
mBitmap.unlockPixels();
mBitmap.notifyPixelsChanged();
mBitmap.setAlphaType(kOpaque_SkAlphaType);
mBitmap.setAlphaType(kIgnore_SkAlphaType);
}
mSize = aSize;