How is this done in Gecko?

We learn something is not visible during one of the various cullings
of WebRender. So I guess the idea would be to have some notification
you send when something goes from visible previously to invisible. I
suppose there is an analog when doing flow construction that you might
find a flow that was previously visible is now display: none.

So it almost seems like we want something in the DOM elements which
allow them to be notified of visibility changes. For videos, this
could stop video decode, and for images, this may let their cache
memory be reclaimed, etc.

One issue that wasn't covered in that lightning talk is that what
happens when the video comes back into view? Decoding can only be
started at a keyframe, so how do they resume playback? Does the
demuxer tell them which frames are prediction sources so they can save
those and then resume decoding by decoding those plus the current
frame? VLC for example does not have a check for this which results in
very odd results where only the part of the image that is moving is
visible until a new keyframe appears and the whole scene pops into
view.

jack.

On Fri, Jun 17, 2016 at 5:01 AM, Josh Matthews <j...@joshmatthews.net> wrote:
> While listening to the Gecko platform talk about shutting down video
> decoders for offscreen elements, I wondered about how we could do the same
> in Servo. We obviously don't support decoding video yet, but what would be
> an efficient way of doing that in the future?
>
> Cheers,
> Josh
> _______________________________________________
> dev-servo mailing list
> dev-servo@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-servo
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to