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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user