As an interested reader I would like to understand the difference and have a naive question: Isn't it that you can [either](https://searchfox.org/mozilla-central/rev/a315a1a0f09550e23e4590a77e74f36543315da3/gfx/wr/webrender_api/src/image.rs#66) a) copy an image into shared memory to pass it acrosses processes as [RawData](https://searchfox.org/mozilla-central/rev/a315a1a0f09550e23e4590a77e74f36543315da3/gfx/wr/webrender/src/renderer.rs#3980,3997) to WebRender, [who uploads/copies it for you](https://searchfox.org/mozilla-central/rev/a315a1a0f09550e23e4590a77e74f36543315da3/gfx/wr/webrender/src/device/gl.rs#4004,4032) (=two copies?), or b) upload/copy an image into a GL texture [by yourself and pass it as NativeTexture](https://github.com/servo/webrender/blob/6f418a33794b11ead63f6e714d52ebe6cf0071aa/examples/yuv.rs#L74) to WebRender, who directly renders from it? (=one copy?) Weren't bug 1403618 and sisters about b)? > The idea is to have all decoders in the GPU process; there will be no need to copy the decoded image into a shared buffer. The aim is to render it directly what comes out of the decoder, be it software or hardware Woudn't that just reduce the first copy in a) which is not needed for WebRender because you have b)? So is this concern only about non-WebRender or Software WebRender? > FFmpeg uses a pool of software buffers. Those buffer are ref-counted so we could keep them for longer; however making this refcounting system work across process (between RDD/Content/GPU) is currently non-functional (and I'm not sure it could be done). Or do you want to go from one-copy down to zero-copy ([what Chrome describes here](https://software.intel.com/content/www/us/en/develop/articles/native-one-copy-texture-uploads-for-chrome-os-on-intel-architecture-enabled-by-default.html)) by letting ffmpeg directly software-decode into a given piece of gpu memory by using dmabuf, so that it doesn't have to allocate its own internal memory you would normally copy from? Is that bug 1376999 and bug 1539735 together? And these gpu cache misses Chrome talks about wouldn't matter because video is anyway not be indended for the picture cache?
Bug 1589165 Comment 8 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
As an interested reader I would like to understand the difference and have a naive question: Isn't it that you can [either](https://searchfox.org/mozilla-central/rev/a315a1a0f09550e23e4590a77e74f36543315da3/gfx/wr/webrender_api/src/image.rs#66) a) copy an image into shared memory to pass it acrosses processes as [RawData](https://searchfox.org/mozilla-central/rev/a315a1a0f09550e23e4590a77e74f36543315da3/gfx/wr/webrender/src/renderer.rs#3980,3997) to WebRender, [who uploads/copies it for you](https://searchfox.org/mozilla-central/rev/a315a1a0f09550e23e4590a77e74f36543315da3/gfx/wr/webrender/src/device/gl.rs#4004,4032) (=two copies?), or b) upload/copy an image into a GL texture [by yourself and pass it as NativeTexture](https://github.com/servo/webrender/blob/6f418a33794b11ead63f6e714d52ebe6cf0071aa/examples/yuv.rs#L74) to WebRender, who directly renders from it? (=one copy?) Weren't bug 1403618 and sisters about b)? > The idea is to have all decoders in the GPU process; there will be no need to copy the decoded image into a shared buffer. The aim is to render it directly what comes out of the decoder, be it software or hardware Woudn't that just reduce the first copy in a) which is not needed for WebRender because you have b)? So is this concern only about non-WebRender or Software WebRender? > FFmpeg uses a pool of software buffers. Those buffer are ref-counted so we could keep them for longer; however making this refcounting system work across process (between RDD/Content/GPU) is currently non-functional (and I'm not sure it could be done). Or do you want to go from one-copy down to zero-copy ([what Chrome describes here](https://software.intel.com/content/www/us/en/develop/articles/native-one-copy-texture-uploads-for-chrome-os-on-intel-architecture-enabled-by-default.html)) by letting ffmpeg directly software-decode into a given piece of gpu memory by using dmabuf, so that it doesn't have to allocate its own internal memory you would normally copy from? Is that bug 1376999 and bug 1539735 together? And these gpu cache misses Chrome talks about wouldn't matter because video is anyway not indended for the picture cache?