Closed
Bug 1170680
Opened 10 years ago
Closed 10 years ago
Do not add non-animated images to the visible list in response to UNLOCKED_DRAW
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Core
Layout: Images, Video, and HTML Frames
Tracking
()
RESOLVED
FIXED
mozilla41
People
(Reporter: seth, Assigned: seth)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 3 obsolete files)
We do not currently get the full benefits of the image locking improvements made for bug 1166136 so far, because we still end up drawing images for the low-res displayport during fast scrolling, and drawing them in this way ends up locking them. Although they get unlocked the next time we calculate image visibility, on low-memory devices (e.g. a Flame limited to 319MB), we can end up running out of image memory during a single paint pass on the low-res displayport in bad cases. And unfortunately the Gallery app is such a bad case.
Assignee | ||
Comment 1•10 years ago
|
||
Here's the patch.
This is the only consumer of UNLOCKED_DRAW, so we could potentially remove
everything UNLOCKED_DRAW-related now, but because this is intended for B2G 2.2
uplift, I'd prefer to do that part in a followup.
Attachment #8614217 -
Flags: review?(tnikkel)
Assignee | ||
Comment 2•10 years ago
|
||
Assignee | ||
Comment 3•10 years ago
|
||
OK, after discussion on IRC with Timothy, it's become clear that we still want to add animated images to the visible images list promptly, so they start animating without delay.
I've updated the summary of the bug to reflect this new approach: now we'll add images to the visible list in response to UNLOCKED_DRAW if they're animated, but not otherwise.
Summary: Do not lock images in response to UNLOCKED_DRAW → Do not add non-animated images to the visible list in response to UNLOCKED_DRAW
Assignee | ||
Updated•10 years ago
|
Attachment #8614217 -
Attachment is obsolete: true
Attachment #8614217 -
Flags: review?(tnikkel)
Assignee | ||
Comment 4•10 years ago
|
||
OK, this patch implements the new approach discussed in comment 3.
There's no downside to adding animated images to the visible list, really, since
animated images are always locked anyway.
Attachment #8614253 -
Flags: review?(tnikkel)
Assignee | ||
Comment 5•10 years ago
|
||
Assignee | ||
Comment 6•10 years ago
|
||
Whoops. Forgot an initial null check.
Attachment #8614353 -
Flags: review?(tnikkel)
Assignee | ||
Updated•10 years ago
|
Attachment #8614253 -
Attachment is obsolete: true
Attachment #8614253 -
Flags: review?(tnikkel)
Assignee | ||
Comment 7•10 years ago
|
||
Updated•10 years ago
|
Attachment #8614353 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 8•10 years ago
|
||
This patch triggers a failure in layout/reftests/image-element/bug-364968.html. I've seen this fail due to many of my try pushes lately with many different patches. I suspect we simply have a bug related to sync decoding and -moz-element() which I haven't been able to track down yet. Given the importance of this patch and the tight timelimit before B2G 2.2 ships, I've decided to mark the test random in this bug and reenable it in bug 1170871.
Assignee | ||
Comment 9•10 years ago
|
||
This version of the patch is identical except that it disables
layout/reftests/image-element/bug-364968.html.
Assignee | ||
Updated•10 years ago
|
Attachment #8614353 -
Attachment is obsolete: true
Assignee | ||
Comment 10•10 years ago
|
||
Comment 11•10 years ago
|
||
(In reply to Seth Fowler [:seth] from comment #8)
> This patch triggers a failure in
> layout/reftests/image-element/bug-364968.html. I've seen this fail due to
> many of my try pushes lately with many different patches. I suspect we
> simply have a bug related to sync decoding and -moz-element() which I
> haven't been able to track down yet. Given the importance of this patch and
> the tight timelimit before B2G 2.2 ships, I've decided to mark the test
> random in this bug and reenable it in bug 1170871.
This seems like it's probably due to the fact that "ImageIsAnimated" returns false if it encounters a non-success return codes and RasterImage returns a not available return code when the image hasn't been decoded yet (ie it doesn't know if its animated).
Comment 12•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Assignee | ||
Comment 13•10 years ago
|
||
(In reply to Timothy Nikkel (:tn) from comment #11)
> This seems like it's probably due to the fact that "ImageIsAnimated" returns
> false if it encounters a non-success return codes and RasterImage returns a
> not available return code when the image hasn't been decoded yet (ie it
> doesn't know if its animated).
As we discussed on IRC, that doesn't explain this test failure. It is something that we should probably address, though.
Assignee | ||
Comment 14•10 years ago
|
||
Comment on attachment 8614460 [details] [diff] [review]
Do not add non-animated images to the visible list in response to UNLOCKED_DRAW
NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Not sure, but it was exposed by the fact that we enabled image locking on B2G in bug 1148696.
User impact if declined: Images may fail to decode due to low memory, causing blank thumbnails in the gallery which may persist across reboots (making this effectively a data loss issue). This patch is one of several that together fix bug 1166136, which is nominated for blocking 2.2, and bug 1164164, which is a 2.2 blocker.
Testing completed: Extensively tested locally. On mozilla-central.
Risk to taking this patch (and alternatives if risky): This is a very simple, low risk patch.
String or UUID changes made by this patch: None.
Attachment #8614460 -
Flags: approval-mozilla-b2g37?
Updated•10 years ago
|
status-b2g-v2.2:
--- → affected
status-b2g-master:
--- → fixed
Comment 15•10 years ago
|
||
Comment on attachment 8614460 [details] [diff] [review]
Do not add non-animated images to the visible list in response to UNLOCKED_DRAW
Approving as this causing Gallery locking issue of bug 1166136.
Attachment #8614460 -
Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
Comment 16•10 years ago
|
||
Hi Eric,
Could you help to find someone perform regression on Gallery app for 2.2? There has been lots of dependencies for bug 1166136 landed on 2.2.
Thanks!
Flags: needinfo?(echang)
Comment 17•10 years ago
|
||
Sure, we will start regression check on today's build on Gallery and Camera this afternoon.
Flags: needinfo?(echang)
Updated•10 years ago
|
status-firefox39:
--- → wontfix
status-firefox40:
--- → wontfix
Comment 18•10 years ago
|
||
Updated•6 years ago
|
Product: Core → Core Graveyard
Updated•6 years ago
|
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•