don't assert that LookupFrame will always find a result for animated images

NEW
Assigned to

Status

()

Core
ImageLib
P3
normal
2 years ago
6 months ago

People

(Reporter: tnikkel, Assigned: tnikkel)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

2 years ago
Created attachment 8723862 [details] [diff] [review]
patch

We could also make this assert much more complicated taking into account the result and the flags so that it still holds.
Attachment #8723862 - Flags: review?(seth)
Comment on attachment 8723862 [details] [diff] [review]
patch

Review of attachment 8723862 [details] [diff] [review]:
-----------------------------------------------------------------

I dunno about this. If the flags or size are different, it's an issue with the caller, and we should catch that. If you want to turn it into a series of assertions to make it more straightforward to diagnose the problem, that'd be fine with me, but this assertion has found real bugs in the past and so I'm kinda hesitant to remove it.
Attachment #8723862 - Flags: review?(seth)
(Assignee)

Comment 3

2 years ago
(In reply to Seth Fowler [:seth] [:s2h] from comment #2)
> Comment on attachment 8723862 [details] [diff] [review]
> patch
> 
> Review of attachment 8723862 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I dunno about this. If the flags or size are different, it's an issue with
> the caller, and we should catch that. If you want to turn it into a series
> of assertions to make it more straightforward to diagnose the problem,
> that'd be fine with me, but this assertion has found real bugs in the past
> and so I'm kinda hesitant to remove it.

The situation is that we have an animated img on a page, and so it's frames are in the surface cache, with flags = 0. Then webgl comes along and does a teximage2d, which asks for the frames with flags = no_colorspace_conversion, and it also asks for a sync decode. Since it is a sync decode LookupFrameInternal looks for an exact match, and returns nothing if there is no exact match. We don't match because of the colorspace conversion flag. There are two users of the same image: webgl is trying to use the image as a texture, and we need to paint the image as part of the html page normally. Which is a valid thing to do.
Whiteboard: [gfx-noted]
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.