Skip to content
  • enne@google.com's avatar
    [chromium] Update VideoLayerChromium textures after texture resources are reclaimed · a63c1ca4
    enne@google.com authored
    https://bugs.webkit.org/show_bug.cgi?id=68742
    
    Reviewed by James Robinson.
    
    Source/WebCore:
    
    If video textures are reclaimed (such as during a visibility change on
    a tab), the dirty rect for the layer is empty and it skips out of
    updating compositor resources, leaving the video textures invalid.
    Instead, check the textures here to make sure they're still valid
    first before early out so that they can get reupdated if necessary.
    
    Additionally, fix a small bug in pushPropertiesTo where 1 plane RGB
    videos would not get drawn because all 3 planes didn't have valid
    textures.
    
    Test: compositing/video-page-visibility.html
    
    * platform/graphics/chromium/VideoLayerChromium.cpp:
    (WebCore::VideoLayerChromium::VideoLayerChromium):
    (WebCore::VideoLayerChromium::cleanupResources):
    (WebCore::VideoLayerChromium::updateCompositorResources):
    (WebCore::VideoLayerChromium::pushPropertiesTo):
    (WebCore::VideoLayerChromium::setLayerTreeHost):
    (WebCore::VideoLayerChromium::texturesValid):
    * platform/graphics/chromium/VideoLayerChromium.h:
    
    LayoutTests:
    
    Without this patch, this video texture is invalid.
    
    * compositing/video-page-visibility-expected.png: Added.
    * compositing/video-page-visibility-expected.txt: Added.
    * compositing/video-page-visibility.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a63c1ca4