Bug 994938 - Support ARGB32 in nsShmImagee r=jrmuizel

This commit is contained in:
George Wright 2014-04-10 16:51:59 -04:00
parent 85e54605a1
commit 3440d2242c

View File

@ -76,6 +76,14 @@ nsShmImage::Create(const gfxIntSize& aSize,
shm->mXAttached = true;
shm->mSize = aSize;
switch (shm->mImage->depth) {
case 32:
if ((shm->mImage->red_mask == 0xff0000) &&
(shm->mImage->green_mask == 0xff00) &&
(shm->mImage->blue_mask == 0xff)) {
shm->mFormat = gfxImageFormat::ARGB32;
break;
}
goto unsupported;
case 24:
// Only xRGB is supported.
if ((shm->mImage->red_mask == 0xff0000) &&