Closed Bug 1377252 Opened 7 years ago Closed 7 years ago

RasterImage::IsUnlocked isn't correct

Categories

(Core :: Graphics: ImageLib, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

Details

Attachments

(1 file)

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.
Attached 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+
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
https://hg.mozilla.org/mozilla-central/rev/bb6cf8e70673
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: