RasterImage::IsUnlocked isn't correct

RESOLVED FIXED in Firefox 56

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: tnikkel, Assigned: tnikkel)

Tracking

Trunk
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
We currently use RasterImage::IsUnlocked for two different purposes:
1) to determine that we can't throw away the decoded image in WillDrawOpaqueNow
2) to determine when to send the unlockeddraw notification

For 1) what we want to check is mLockCount == 0.

For 2) what we actually want to check is mAnimationConsumers == 0. This is because images that are in the visible list in background tabs will have mLockCount == 0 but mAnimationConsumers > 0 and if we are drawing an image we need to make sure it will be animated (mAnimationConsumers == 0 stops the animation). This is what VectorImage already does.
(Assignee)

Comment 1

2 years ago
Posted patch isunlockedSplinter Review
Attachment #8882327 - Flags: review?(aosmond)
Comment on attachment 8882327 [details] [diff] [review]
isunlocked

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

LGTM.
Attachment #8882327 - Flags: review?(aosmond) → review+

Comment 3

2 years ago
Pushed by tnikkel@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bb6cf8e70673
Stop using RasterImage::IsUnlocked because it doesn't do what we want. r=aosmond

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/bb6cf8e70673
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.