• commit-queue@webkit.org's avatar
    [chromium] Push drawsContent and contentsVisible into accelerated compositor · 762030df
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=71209
    
    Patch by Shawn Singh <shawnsingh@chromium.org> on 2012-01-03
    Reviewed by James Robinson.
    
    Source/WebCore:
    
    Tests: compositing/visibility/visibility-simple-canvas2d-layer.html
           compositing/visibility/visibility-simple-video-layer.html
           compositing/visibility/visibility-simple-webgl-layer.html
    
    Rebaselined compositing/visibility/visibility-image-layers.html
    
    The CSS visibility property was not being properly obeyed by many
    specialized layer types in the accelerated compositor. The root of
    the problem was that drawsContent and contentsVisible flags were
    not properly propagated into the compositor. This patch removes
    the drawsContent() callback, and instead makes sure that
    drawsContent and contentsVisible are "pushed" through the
    accelerated compositor.
    
    * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
    (WebCore::Canvas2DLayerChromium::drawsContent):
    * platform/graphics/chromium/ContentLayerChromium.cpp:
    * platform/graphics/chromium/ContentLayerChromium.h:
    * platform/graphics/chromium/GraphicsLayerChromium.cpp:
    (WebCore::GraphicsLayerChromium::setDrawsContent):
    (WebCore::GraphicsLayerChromium::setContentsVisible):
    (WebCore::GraphicsLayerChromium::setContentsToImage):
    (WebCore::GraphicsLayerChromium::setContentsToCanvas):
    (WebCore::GraphicsLayerChromium::setContentsToMedia):
    (WebCore::GraphicsLayerChromium::updateLayerIsDrawable):
    (WebCore::GraphicsLayerChromium::setupContentsLayer):
    * platform/graphics/chromium/GraphicsLayerChromium.h:
    * platform/graphics/chromium/LayerChromium.cpp:
    (WebCore::LayerChromium::LayerChromium):
    (WebCore::LayerChromium::setIsDrawable):
    * platform/graphics/chromium/LayerChromium.h:
    (WebCore::LayerChromium::drawsContent):
    * platform/graphics/chromium/PluginLayerChromium.h:
    * platform/graphics/chromium/TiledLayerChromium.cpp:
    (WebCore::TiledLayerChromium::drawsContent):
    * platform/graphics/chromium/VideoLayerChromium.h:
    * platform/graphics/chromium/WebGLLayerChromium.cpp:
    (WebCore::WebGLLayerChromium::drawsContent):
    * platform/graphics/chromium/cc/CCLayerImpl.cpp:
    (WebCore::CCLayerImpl::dumpLayerProperties):
    
    Source/WebKit/chromium:
    
    * src/WebContentLayerImpl.cpp:
    (WebKit::WebContentLayerImpl::WebContentLayerImpl):
    (WebKit::WebContentLayerImpl::setDrawsContent):
    * src/WebContentLayerImpl.h:
    * src/WebExternalTextureLayerImpl.cpp:
    (WebKit::WebExternalTextureLayerImpl::drawsContent):
    * src/WebLayerImpl.cpp:
    (WebKit::WebLayerImpl::WebLayerImpl):
    * src/WebLayerImpl.h:
    * tests/CCLayerTreeHostTest.cpp:
    (WTF::ContentLayerChromiumWithUpdateTracking::ContentLayerChromiumWithUpdateTracking):
    * tests/Canvas2DLayerChromiumTest.cpp:
    * tests/LayerChromiumTest.cpp:
    * tests/TiledLayerChromiumTest.cpp:
    (WTF::FakeTiledLayerChromium::FakeTiledLayerChromium):
    
    LayoutTests:
    
    * compositing/visibility/visibility-image-layers-expected.png:
    * compositing/visibility/visibility-image-layers-expected.txt: Renamed from LayoutTests/platform/mac/compositing/visibility/visibility-image-layers-expected.txt.
    * compositing/visibility/visibility-simple-canvas2d-layer-expected.png: Added.
    * compositing/visibility/visibility-simple-canvas2d-layer-expected.txt: Added.
    * compositing/visibility/visibility-simple-canvas2d-layer.html: Added.
    * compositing/visibility/visibility-simple-video-layer-expected.png: Added.
    * compositing/visibility/visibility-simple-video-layer-expected.txt: Added.
    * compositing/visibility/visibility-simple-video-layer.html: Added.
    * compositing/visibility/visibility-simple-webgl-layer-expected.png: Added.
    * compositing/visibility/visibility-simple-webgl-layer-expected.txt: Added.
    * compositing/visibility/visibility-simple-webgl-layer.html: Added.
    * platform/chromium-mac-snowleopard/compositing/visibility/visibility-image-layers-expected.png: Removed.
    * platform/chromium-win/compositing/visibility/visibility-image-layers-expected.png: Removed.
    * platform/chromium/test_expectations.txt:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    762030df
test_expectations.txt 207 KB