Closed
Bug 1428558
Opened 7 years ago
Closed 6 years ago
Support async animated image updates
Categories
(Core :: Graphics: WebRender, enhancement, P2)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: aosmond)
References
Details
Attachments
(8 files)
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review |
These should work really well with webrender and will avoid us having to do any display list building or scene building.
Updated•7 years ago
|
Blocks: stage-wr-trains
Priority: -- → P2
Assignee | ||
Comment 1•7 years ago
|
||
I've already been doing the prep work for this.
Assignee: nobody → aosmond
Comment 2•6 years ago
|
||
Hey Andrew & Jeff -- What more is required here once bug 1337111 lands? How important is this to WR MVP?
Flags: needinfo?(jmuizelaar)
Flags: needinfo?(aosmond)
Assignee | ||
Comment 3•6 years ago
|
||
I think it is reasonably important. Not only will it avoid scene rebuilds for animated images, it will reduce texture uploads as well for animated images that only animate in parts. Both of these will be commonly hit, although the latter really only matters for larger GIFs like those seen in bug 1447351. I'll see if I can put this together on top of bug 1337111 this week, assuming nothing else preempts me. If it takes me much longer than that, we can consider pushing it to block bug 1386674. It definitely shouldn't go to the back of the queue though :).
Flags: needinfo?(aosmond)
Assignee | ||
Comment 4•6 years ago
|
||
Update: I got this partly working today. Still some bugs to iron out / understand.
Flags: needinfo?(jmuizelaar)
Assignee | ||
Comment 5•6 years ago
|
||
Animated images will require scheduling a composite of the frame in
addition to updating the ImageKey/external image ID bindings. It would
be good if this could be done as part of the same IPDL message.
Additionally a page may have many animated images that we update the
frame for at the same time, so these updates should be batched together.
In the event that we needed to regenerate the display list, or produce
an empty transaction, ideally we would just throw these resource updates
in with the rest of the changes. This patch allows us to do all of that
without unnecessarily burdening the caller with tracking extra state.
Assignee | ||
Comment 6•6 years ago
|
||
Animated images will work by changing the external image ID that an
ImageKey points to. We cannot allow the old external image to be
released and potentially unmapped until we have produced a new frame
with the new external image ID. We currently wait until the epoch has
advanced, but in the future when we don't rebuild the scene to animate
an image, the epoch will remain the same. This could cause us to hold
onto no longer used surfaces for much longer than expected. As such, in
this patch we switch to waiting for a FrameRendered notification from
WebRender, which works even if the scene rebuild was avoided.
Depends on D7499
Assignee | ||
Comment 7•6 years ago
|
||
This is a non-functional change. It allows objects that build on top of
these helper classes to be exposed outside of SharedSurfacesChild in
future patches in this series.
Depends on D7500
Assignee | ||
Comment 8•6 years ago
|
||
Depends on D7501
Assignee | ||
Comment 9•6 years ago
|
||
This patch embeds a SharedSurfacesAnimation object inside an
ImageContainer. This allows any consumers of the container to get the
single shared ImageKey for an animation, despite whatever surfaces may
be held inside the container at a given time.
Depends on D7502
Assignee | ||
Comment 10•6 years ago
|
||
This patch allows us to intercept invalidation requests for display
items, and avoid regenerating the display list for animated images which
are using SharedSurfacesAnimation.
Depends on D7503
Assignee | ||
Comment 11•6 years ago
|
||
This patch makes ImageContainer create a SharedSurfacesAnimation object
when it detects that we are using shared surfaces and are producing full
frames.
Depends on D7504
Assignee | ||
Comment 12•6 years ago
|
||
Async animated images need a single ImageKey which can point to any
frame represented by its own external image ID. Additionally a frame
could be referenced again directly (e.g. something shows/uses the first
frame of the animated image).
Before this patch, the ownership between an ImageKey and an external
image ID for a shared surface was not clearly expressed. This resulted
in a special command to release the reference to the external image
separately from deleting the image key.
This patch makes the strong reference to an external image ID and an
ImageKey directly related. Not only does this facilitate multiple
ImageKeys owning the same surface, it also simplifies the ownership
semantics.
Updated•6 years ago
|
Attachment #9013746 -
Attachment description: Bug 1428558 - Part 2. Improve plumbing to sending resource updates to WebRender → Bug 1428558 - Part 2. Improve plumbing to sending resource updates to WebRender.
Assignee | ||
Comment 13•6 years ago
|
||
Sanity check before landing...
try (linux, all -- I've touched a lot): https://treeherder.mozilla.org/#/jobs?repo=try&revision=425da9df6049da61110b18008ad63e099f0f211d
try (windows, osx WR): https://treeherder.mozilla.org/#/jobs?repo=try&revision=d9d1db8624cd48e95a3a86f8ed6bcb22a373659b
Comment 14•6 years ago
|
||
Pushed by aosmond@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/48152d6288e3
Part 1. Streamline mappings between an ImageKey and an ExternalImageId for shared surfaces. r=nical
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a3433fb1c29
Part 2. Improve plumbing to sending resource updates to WebRender. r=nical
https://hg.mozilla.org/integration/mozilla-inbound/rev/92fde8cff068
Part 3. Release our reference to an external image ID as soon as possible. r=nical
https://hg.mozilla.org/integration/mozilla-inbound/rev/0016a111913f
Part 4. Move ImageKeyData/SharedUserData definition to SharedSurfacesChild header. r=nical
https://hg.mozilla.org/integration/mozilla-inbound/rev/f51da704cd5e
Part 5. Add SharedSurfacesAnimation to manage single ImageKey for animated images. r=nical
https://hg.mozilla.org/integration/mozilla-inbound/rev/5329d8f89313
Part 6. Integrate SharedSurfacesAnimation with ImageContainer. r=nical
https://hg.mozilla.org/integration/mozilla-inbound/rev/f474d2aae3cb
Part 7. Suppress display list regeneration for animated image updates. r=nical
https://hg.mozilla.org/integration/mozilla-inbound/rev/7b45f9db5e93
Part 8. Integrate SharedSurfacesAnimation with the rest of imagelib. r=nical
Comment 15•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/48152d6288e3
https://hg.mozilla.org/mozilla-central/rev/1a3433fb1c29
https://hg.mozilla.org/mozilla-central/rev/92fde8cff068
https://hg.mozilla.org/mozilla-central/rev/0016a111913f
https://hg.mozilla.org/mozilla-central/rev/f51da704cd5e
https://hg.mozilla.org/mozilla-central/rev/5329d8f89313
https://hg.mozilla.org/mozilla-central/rev/f474d2aae3cb
https://hg.mozilla.org/mozilla-central/rev/7b45f9db5e93
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•