Thanks for the feedback everyone. It seems like the best cross-platform approach at this time is to hook into RWHV::OnSwapCompositorFrame and use RWHV::CopyFromCompositingSurface. RenderViewDevToolsAgentHost::OnSwapCompositorFrame seems an interesting model for this (inspecting the ViewHostMsg_SwapCompositorFrame message). I'll likely have to tweak things a bit so the RHWV thinks it's visible even when the native window is actually hidden.Are there any upcoming changes planned for OnSwapCompositorFrame or CopyFromCompositingSurface as part of the delegated renderer (ubercompositor) porting effort or OOP-iframe support?
Thanks for the feedback everyone. It seems like the best cross-platform approach at this time is to hook into RWHV::OnSwapCompositorFrame and use RWHV::CopyFromCompositingSurface. RenderViewDevToolsAgentHost::OnSwapCompositorFrame seems an interesting model for this (inspecting the ViewHostMsg_SwapCompositorFrame message). I'll likely have to tweak things a bit so the RHWV thinks it's visible even when the native window is actually hidden.
Are there any upcoming changes planned for OnSwapCompositorFrame or CopyFromCompositingSurface as part of the delegated renderer (ubercompositor) porting effort or OOP-iframe support?Thanks,MarshallOn Thu, Jun 19, 2014 at 7:36 AM, SIVA KUMAR GUNTURI <sivag...@chromium.org> wrote:
I am trying to support a similar kind of capture mechanism when the views are hidden , using the RenderWidgetHostViewAndroid::CopyFromcompositingSurface.Take a look at this bug
https://code.google.com/p/chromium/issues/detail?id=376769.
On Thu, Jun 19, 2014 at 10:31 AM, Marshall Greenblatt <magree...@gmail.com> wrote:
Thanks for the feedback everyone. It seems like the best cross-platform approach at this time is to hook into RWHV::OnSwapCompositorFrame and use RWHV::CopyFromCompositingSurface. RenderViewDevToolsAgentHost::OnSwapCompositorFrame seems an interesting model for this (inspecting the ViewHostMsg_SwapCompositorFrame message). I'll likely have to tweak things a bit so the RHWV thinks it's visible even when the native window is actually hidden.There is no native window for the RWHV. Hiding or showing a RenderWidget allows for freeing or allocating the resources on the render-compositor side, as well as the 'current frame' which is the delegated frame data held on to by RWHV.
@Daniel, Sorry I missed to conclude over this.
Below are the different things the copyFromCompisitingSurface will support.
- allow to invoke a read-back while a view is visible only.
- allow to hide a view while a read-back is pending.
- allow a read-back request to wait for a first frame if it was invoked while no frame was received yet.
- allow to lock the front buffer (current frame) when hiding a view (Android has that already).
One more case we wanted to support capture is where we don't have a frame yet but the view is being hidden.
This can be accomplished by talking to the frame evictor, it can decide to defer eviction and trigger a read-back instead.
On Thu, Jun 19, 2014 at 10:31 AM, Marshall Greenblatt <magree...@gmail.com> wrote:
Thanks for the feedback everyone. It seems like the best cross-platform approach at this time is to hook into RWHV::OnSwapCompositorFrame and use RWHV::CopyFromCompositingSurface. RenderViewDevToolsAgentHost::OnSwapCompositorFrame seems an interesting model for this (inspecting the ViewHostMsg_SwapCompositorFrame message). I'll likely have to tweak things a bit so the RHWV thinks it's visible even when the native window is actually hidden.Are there any upcoming changes planned for OnSwapCompositorFrame or CopyFromCompositingSurface as part of the delegated renderer (ubercompositor) porting effort or OOP-iframe support?We're been/are working on consolidating our swap and readback paths into all looking like these two, so this sounds like a good way to go.
Hi, everybody!I would add the 3rd case: sometimes it's nice to have scoped_refptr<cc::Layer> readback_layer as an output.
> what is output we want from RWHV::CopyFromCompositingSurface?
To add some background filters and use it in Browser-side UI, for example.
- DS
My impression of use cases for this was things that would not be reading a constant stream of textures. If they want to give those textures back to chromium to copy into again, can it again flush after not using the texture again? Nothing here is as performant as sync points, I guess we'd need a compelling use case to add some external sync-point-like thing.
I meant any suitable Layer-derived class, of couse.
Now I see that It would be easy to create TextureLayer once you have TextureMailBox for readback data.
So, my 3rd case is redundant. Thanks for pointing that out!
Also I meant the case where RenderWidgetHostViewAndroid::CopyFromCompositingSurface uses DelegatedRendererLayer effectively. What's the difference to hold that layer instead of TextureLayer?