Issue #2041 Follow-up - Remove opacity check from original patch.

Per Issue #2033 we don't support expanding RGB to RGBA yet, so this opacity
 check will always return RGBX, which makes images with transparent backgrounds
 show up with a black background instead. Feel free to readd once we backport
 Mozilla bug 1551088.
This commit is contained in:
Job Bautista 2022-12-02 14:17:10 +08:00 • committed by roytam1
commit 54e073511a
2 changed files with 1 additions and 6 deletions

View file

@ -63,7 +63,6 @@ nsJXLDecoder::nsJXLDecoder(RasterImage* aImage)
JxlThreadParallelRunnerMake(nullptr, PreferredThreadCount())),
mNumFrames(0),
mTimeout(FrameTimeout::Forever()),
mSurfaceFormat(SurfaceFormat::B8G8R8X8),
mContinue(false) {
JxlDecoderSubscribeEvents(mDecoder.get(),
JXL_DEC_BASIC_INFO | JXL_DEC_FRAME |
@ -250,10 +249,7 @@ nsJXLDecoder::ReadJXLData(const char* aData, size_t aLength)
Some(invalidRect->mOutputSpaceRect));
}
Opacity opacity = mSurfaceFormat == SurfaceFormat::B8G8R8A8
? Opacity::SOME_TRANSPARENCY
: Opacity::FULLY_OPAQUE;
PostFrameStop(opacity);
PostFrameStop();
if (!IsFirstFrameDecode() && mInfo.have_animation &&
!mFrameHeader.is_last) {

View file

@ -48,7 +48,6 @@ class nsJXLDecoder final : public Decoder {
uint32_t mNumFrames;
FrameTimeout mTimeout;
gfx::SurfaceFormat mSurfaceFormat;
SurfacePipe mPipe;
bool mContinue;
};