Bug 1594425 - Part 2. Switch image decoders to use SurfaceFormat::OS_RGBA. r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D52008
This commit is contained in:
Andrew Osmond
2019-11-12 18:22:33 +00:00
parent a017946427
commit 03b9abc108
19 changed files with 157 additions and 160 deletions

View File

@@ -141,7 +141,7 @@ DynamicImage::GetFrameAtSize(const IntSize& aSize, uint32_t aWhichFrame,
uint32_t aFlags) {
RefPtr<DrawTarget> dt =
gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget(
aSize, SurfaceFormat::B8G8R8A8);
aSize, SurfaceFormat::OS_RGBA);
if (!dt || !dt->IsValid()) {
gfxWarning()
<< "DynamicImage::GetFrame failed in CreateOffscreenContentDrawTarget";
@@ -198,8 +198,8 @@ DynamicImage::Draw(gfxContext* aContext, const nsIntSize& aSize,
if (aSize == drawableSize) {
gfxUtils::DrawPixelSnapped(aContext, mDrawable, SizeDouble(drawableSize),
aRegion, SurfaceFormat::B8G8R8A8,
aSamplingFilter, aOpacity);
aRegion, SurfaceFormat::OS_RGBA, aSamplingFilter,
aOpacity);
return ImgDrawResult::SUCCESS;
}
@@ -213,7 +213,7 @@ DynamicImage::Draw(gfxContext* aContext, const nsIntSize& aSize,
aContext->Multiply(gfxMatrix::Scaling(scale.width, scale.height));
gfxUtils::DrawPixelSnapped(aContext, mDrawable, SizeDouble(drawableSize),
region, SurfaceFormat::B8G8R8A8, aSamplingFilter,
region, SurfaceFormat::OS_RGBA, aSamplingFilter,
aOpacity);
return ImgDrawResult::SUCCESS;
}