[chromium] Push drawsContent and contentsVisible into accelerated compositor
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jan 2012 00:53:45 +0000 (00:53 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jan 2012 00:53:45 +0000 (00:53 +0000)
commit1b0ba3a8868689b61d0d9c17197b650ea5d9f6ec
tree44db5b70487664b46e2661fc158814b54fb37e60
parentc033dc61d183d85dfa5badc04cd6d7f2ead8848b
[chromium] Push drawsContent and contentsVisible into accelerated compositor
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: https://svn.webkit.org/repository/webkit/trunk@103990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
38 files changed:
LayoutTests/ChangeLog
LayoutTests/compositing/visibility/visibility-image-layers-expected.png
LayoutTests/compositing/visibility/visibility-image-layers-expected.txt [moved from LayoutTests/platform/mac/compositing/visibility/visibility-image-layers-expected.txt with 100% similarity]
LayoutTests/compositing/visibility/visibility-simple-canvas2d-layer-expected.png [new file with mode: 0644]
LayoutTests/compositing/visibility/visibility-simple-canvas2d-layer-expected.txt [new file with mode: 0644]
LayoutTests/compositing/visibility/visibility-simple-canvas2d-layer.html [new file with mode: 0644]
LayoutTests/compositing/visibility/visibility-simple-video-layer-expected.png [new file with mode: 0644]
LayoutTests/compositing/visibility/visibility-simple-video-layer-expected.txt [new file with mode: 0644]
LayoutTests/compositing/visibility/visibility-simple-video-layer.html [new file with mode: 0644]
LayoutTests/compositing/visibility/visibility-simple-webgl-layer-expected.png [new file with mode: 0644]
LayoutTests/compositing/visibility/visibility-simple-webgl-layer-expected.txt [new file with mode: 0644]
LayoutTests/compositing/visibility/visibility-simple-webgl-layer.html [new file with mode: 0644]
LayoutTests/platform/chromium-mac-snowleopard/compositing/visibility/visibility-image-layers-expected.png [deleted file]
LayoutTests/platform/chromium-win/compositing/visibility/visibility-image-layers-expected.png [deleted file]
LayoutTests/platform/chromium/test_expectations.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h
Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h
Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerChromium.h
Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/VideoLayerChromium.h
Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebContentLayerImpl.cpp
Source/WebKit/chromium/src/WebContentLayerImpl.h
Source/WebKit/chromium/src/WebExternalTextureLayerImpl.cpp
Source/WebKit/chromium/src/WebLayerImpl.cpp
Source/WebKit/chromium/src/WebLayerImpl.h
Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
Source/WebKit/chromium/tests/Canvas2DLayerChromiumTest.cpp
Source/WebKit/chromium/tests/LayerChromiumTest.cpp
Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp