mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-04 14:27:30 +09:00
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:
parent
0bd6f00356
commit
54e073511a
2 changed files with 1 additions and 6 deletions
|
|
@ -63,7 +63,6 @@ nsJXLDecoder::nsJXLDecoder(RasterImage* aImage)
|
||||||
JxlThreadParallelRunnerMake(nullptr, PreferredThreadCount())),
|
JxlThreadParallelRunnerMake(nullptr, PreferredThreadCount())),
|
||||||
mNumFrames(0),
|
mNumFrames(0),
|
||||||
mTimeout(FrameTimeout::Forever()),
|
mTimeout(FrameTimeout::Forever()),
|
||||||
mSurfaceFormat(SurfaceFormat::B8G8R8X8),
|
|
||||||
mContinue(false) {
|
mContinue(false) {
|
||||||
JxlDecoderSubscribeEvents(mDecoder.get(),
|
JxlDecoderSubscribeEvents(mDecoder.get(),
|
||||||
JXL_DEC_BASIC_INFO | JXL_DEC_FRAME |
|
JXL_DEC_BASIC_INFO | JXL_DEC_FRAME |
|
||||||
|
|
@ -250,10 +249,7 @@ nsJXLDecoder::ReadJXLData(const char* aData, size_t aLength)
|
||||||
Some(invalidRect->mOutputSpaceRect));
|
Some(invalidRect->mOutputSpaceRect));
|
||||||
}
|
}
|
||||||
|
|
||||||
Opacity opacity = mSurfaceFormat == SurfaceFormat::B8G8R8A8
|
PostFrameStop();
|
||||||
? Opacity::SOME_TRANSPARENCY
|
|
||||||
: Opacity::FULLY_OPAQUE;
|
|
||||||
PostFrameStop(opacity);
|
|
||||||
|
|
||||||
if (!IsFirstFrameDecode() && mInfo.have_animation &&
|
if (!IsFirstFrameDecode() && mInfo.have_animation &&
|
||||||
!mFrameHeader.is_last) {
|
!mFrameHeader.is_last) {
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ class nsJXLDecoder final : public Decoder {
|
||||||
|
|
||||||
uint32_t mNumFrames;
|
uint32_t mNumFrames;
|
||||||
FrameTimeout mTimeout;
|
FrameTimeout mTimeout;
|
||||||
gfx::SurfaceFormat mSurfaceFormat;
|
|
||||||
SurfacePipe mPipe;
|
SurfacePipe mPipe;
|
||||||
bool mContinue;
|
bool mContinue;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue