OrientedImage use of WillDrawOpaqueNow isn't great
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: tnikkel, Assigned: tnikkel)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
WillDrawOpaqueNow tries to answer the question "if Draw is called on this image 'pretty soon' from now will it draw something opaque (so I know if I can cull stuff behind it for painting)".
But OrientedImage wants "is the frame I have right now opaque (so I can choose the right format for a surface I'm trying the flipped image into)".
WillDrawOpaqueNow checks the lock count, which is irrelevant for OrientedImage use case (we already have the surface) and it calls LookupBestMatch, which means it could be returning a difference surface than the one OrientedImage got, so whether or not the surface is finished decoding could differ between these two surfaces.
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
WillDrawOpaqueNow tries to answer the question "if Draw is called on this image 'pretty soon' from now will it draw something opaque (so I know if I can cull stuff behind it for painting)".
But OrientedImage wants "is the frame I have right now opaque (so I can choose the right format for a surface I'm trying to draw the flipped image into)".
Bug 1260324 replaces imgIContainer::IsOpaque with WillDrawOpaquaNow, but it should have considered this case a bit more.
RasterImage::GetFrame already checks if the surface is finished before returning, and we have the format on the returned frame, so we don't need anything complicated here.
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Comment 4•5 years ago
|
||
bugherder |
Description
•