[Webkit-unassigned] [Bug 76720] [chromium] Refactor video drawing to be more data driven

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 25 08:49:09 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=76720


Dana Jansens <danakj at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |danakj at chromium.org




--- Comment #10 from Dana Jansens <danakj at chromium.org>  2012-01-25 08:49:09 PST ---
(In reply to comment #9)
> (In reply to comment #7)
> > I think texture upload could still be separated out from drawing if we added a CCLayerImpl::postDraw() function then, instead of a pre-draw one.  The guarantee would be that any layer that had appendQuads called on it would also get a postDraw() call.  Then, CCVideoLayerImpl::appendQuads could upload textures and take a lock, generating quads with not much more than texture ids and rects, while CCVideoLayerImpl::postDraw() would be able to hand back the frame.
> 
> appendQuads can't upload the textures, since it doesn't have access to the GraphicsContext3D, TextureAllocator, LayerRenderCapabilities, or TextureManager. 
> 
> Based on the comments on bug 76715, it feels like the texture upload should happen in LayerChromium::updateCompositorResources. I don't see how I can do this, as the TextureAllocator (required by CCVideoLayerImpl::copyPlaneToTexture)  is created in LayerRendererChromium::initializeSharedObjects, so I can't access it in updateCompositorResources.

updateCompositorResources is where textures are uploaded that are painted on the main/webkit thread. IIUC video is creating frames on the impl/draw thread so it wouldn't belong in here.

> I don't see how textures can be uploaded in either appendQuads or in updateCompositorResources. 
> 
> If we can figure out how to upload textures in updateCompositorResources, then I think we would want to create LayerChromium::postDraw() instead of CCLayerImpl::postDraw().

LayerChromium exists on the main thread side (hence no Impl suffix) so it is not part of the "draw" process at all.

> Any suggestions?

TextureManager/Allocator are also constructs from the main thread side of the compositor. Without digging deeper I think you probably want to take how the CCVLI draw stuff was uploading textures and just move that into appendQuads modulo appropriate plumbing.

Hope this helps until enne gets in :)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list