Bug 66434

Summary: [chromium] Update VideoLayerChromium to not access GC3D on the main thread
Product: WebKit Reporter: Adrienne Walker <enne>
Component: WebCore Misc.Assignee: Adrienne Walker <enne>
Status: RESOLVED FIXED    
Severity: Normal CC: enne, hclam, husky, jamesr, nduca, scherkus
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 66430    
Attachments:
Description Flags
Patch jamesr: review+

Adrienne Walker
Reported 2011-08-17 16:55:53 PDT
VideoLayerChromium needs to be refactored to not access layerRenderer() or layerRendererContext(). The only GC3D that should be accessed is during updateCompositorResources. This also means that resource deletion (via the destructor, for example) needs to be deferred until the next commit as the GC3D is not immediately available. I'm not sure of the best way to do this. These texture IDs need to be put on a queue either in the TextureManager or perhaps via some out-of-band message to the compositor thread.
Attachments
Patch (21.87 KB, patch)
2011-08-24 18:04 PDT, Adrienne Walker
jamesr: review+
Adrienne Walker
Comment 1 2011-08-24 18:04:28 PDT
James Robinson
Comment 2 2011-08-24 18:14:19 PDT
Comment on attachment 105111 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105111&action=review R=me. The TextureManager right now doesn't know how much memory different texture formats take up (see memoryUseBytes in TextureManager.cpp). That might be worth fixing now that we're managing non-RGBA textures, could you file a bug for that? The current code is a bit pessimistic but not obviously harmful. > Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:72 > +void CCVideoLayerImpl::setTexture(size_t idx, Platform3DObject textureId, const IntSize& size, const IntSize& visibleSize) we don't abbreviate in WebKit, although we do use 'i' so either 'i' or 'index' are good but not 'idx'
Adrienne Walker
Comment 3 2011-08-24 18:25:21 PDT
(In reply to comment #2) > (From update of attachment 105111 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=105111&action=review > > R=me. > > The TextureManager right now doesn't know how much memory different texture formats take up (see memoryUseBytes in TextureManager.cpp). That might be worth fixing now that we're managing non-RGBA textures, could you file a bug for that? The current code is a bit pessimistic but not obviously harmful. https://bugs.webkit.org/show_bug.cgi?id=66917 > > Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:72 > > +void CCVideoLayerImpl::setTexture(size_t idx, Platform3DObject textureId, const IntSize& size, const IntSize& visibleSize) > > we don't abbreviate in WebKit, although we do use 'i' so either 'i' or 'index' are good but not 'idx' Ah, quite right. I personally don't like 'i' as a variable except in a small loop, so I'll just change it to 'index'.
Adrienne Walker
Comment 4 2011-08-25 10:24:20 PDT
Note You need to log in before you can comment on or make changes to this bug.