[chromium] Remove CCLayerDelegate, add ContentLayerDelegate for painting
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jan 2012 00:07:53 +0000 (00:07 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jan 2012 00:07:53 +0000 (00:07 +0000)
commitd41d52006864f6e32c88f550dbbe27e7a1da4dea
tree5178235056cc8b44f4e30ca5b4efce6d9d6e35ea
parentcb0e65eccd2404a644bcaae0352250b1c1f94e0c
[chromium] Remove CCLayerDelegate, add ContentLayerDelegate for painting
https://bugs.webkit.org/show_bug.cgi?id=76663

Reviewed by Kenneth Russell.

Source/WebCore:

CCLayerDelegate used to be an interface with a half-dozen callbacks on it, but now it has only one call -
paintContents() - and that one call is only valid for one subclass of LayerChromium, ContentLayerChromium. This
removes the CCLayerDelegate pointer from LayerChromium and adds a ContentLayerDelegate for the paint call.

The majority of the code changes in this patch are removing the nil parameter from various places that construct
LayerChromium instances. Also tightens the type of GraphicsLayerChromium::m_layer to ContentLayerChromium.

Refactoring/removing dead code, so no new tests.

* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
* platform/graphics/chromium/CanvasLayerChromium.cpp:
(WebCore::CanvasLayerChromium::CanvasLayerChromium):
* platform/graphics/chromium/CanvasLayerChromium.h:
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerPainter::create):
(WebCore::ContentLayerPainter::ContentLayerPainter):
(WebCore::ContentLayerChromium::create):
(WebCore::ContentLayerChromium::ContentLayerChromium):
* platform/graphics/chromium/ContentLayerChromium.h:
(WebCore::ContentLayerDelegate::~ContentLayerDelegate):
(WebCore::ContentLayerChromium::clearDelegate):
* platform/graphics/chromium/DrawingBufferChromium.cpp:
(WebCore::DrawingBuffer::platformLayer):
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::~GraphicsLayerChromium):
(WebCore::GraphicsLayerChromium::setContentsToImage):
(WebCore::GraphicsLayerChromium::setContentsToCanvas):
(WebCore::GraphicsLayerChromium::setContentsToMedia):
(WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
* platform/graphics/chromium/GraphicsLayerChromium.h:
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::create):
(WebCore::ImageLayerChromium::ImageLayerChromium):
* platform/graphics/chromium/ImageLayerChromium.h:
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::create):
(WebCore::LayerChromium::LayerChromium):
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/PluginLayerChromium.cpp:
(WebCore::PluginLayerChromium::create):
(WebCore::PluginLayerChromium::PluginLayerChromium):
* platform/graphics/chromium/PluginLayerChromium.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::TiledLayerChromium):
(WebCore::TiledLayerChromium::drawsContent):
* platform/graphics/chromium/TiledLayerChromium.h:
* platform/graphics/chromium/VideoLayerChromium.cpp:
(WebCore::VideoLayerChromium::create):
(WebCore::VideoLayerChromium::VideoLayerChromium):
* platform/graphics/chromium/VideoLayerChromium.h:
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromium::create):
(WebCore::WebGLLayerChromium::WebGLLayerChromium):
* platform/graphics/chromium/WebGLLayerChromium.h:

Source/WebKit/chromium:

* src/WebContentLayerImpl.cpp:
(WebKit::WebContentLayerImpl::~WebContentLayerImpl):
* src/WebContentLayerImpl.h:
* src/WebExternalTextureLayerImpl.cpp:
(WebKit::WebExternalTextureLayerImpl::WebExternalTextureLayerImpl):
(WebKit::WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl):
* src/WebExternalTextureLayerImpl.h:
* src/WebLayerImpl.cpp:
(WebKit::WebLayerImpl::WebLayerImpl):
(WebKit::WebLayerImpl::~WebLayerImpl):
* src/WebLayerImpl.h:
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::readyStateChanged):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::WebPluginContainerImpl):
* tests/CCLayerIteratorTest.cpp:
* tests/CCLayerTreeHostCommonTest.cpp:
(WebCore::LayerChromiumWithForcedDrawsContent::LayerChromiumWithForcedDrawsContent):
(WebCore::TEST):
* tests/CCLayerTreeHostTest.cpp:
(WTF::CCLayerTreeHostTest::doBeginTest):
(WTF::ContentLayerChromiumWithUpdateTracking::create):
(WTF::ContentLayerChromiumWithUpdateTracking::ContentLayerChromiumWithUpdateTracking):
* tests/LayerChromiumTest.cpp:
* tests/TiledLayerChromiumTest.cpp:
(WTF::FakeTiledLayerChromium::FakeTiledLayerChromium):
* tests/TreeSynchronizerTest.cpp:
(WebCore::MockLayerChromium::MockLayerChromium):
(WebCore::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
36 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/CanvasLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/CanvasLayerChromium.h
Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h
Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp
Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h
Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/ImageLayerChromium.h
Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerChromium.h
Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h
Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/VideoLayerChromium.h
Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.h
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/WebExternalTextureLayerImpl.h
Source/WebKit/chromium/src/WebLayerImpl.cpp
Source/WebKit/chromium/src/WebLayerImpl.h
Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
Source/WebKit/chromium/tests/CCLayerIteratorTest.cpp
Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp
Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
Source/WebKit/chromium/tests/LayerChromiumTest.cpp
Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
Source/WebKit/chromium/tests/TreeSynchronizerTest.cpp