зеркало из https://github.com/mozilla/gecko-dev.git
Bug 987010 - Ignore alpha in Skia BGRX source surfaces - r=gwright
This commit is contained in:
Родитель
2245082f22
Коммит
73b9d741e9
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче