[chromium] Refactor canvas, plugin, and video drawing to be more data-driven
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2012 21:03:19 +0000 (21:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2012 21:03:19 +0000 (21:03 +0000)
commit2d4b939cad26e24660da83276bda1a185c55338a
treeed5766de7736780210eac596949b93169f28be05
parent53bb069e87174f405d722254449544522fa10199
[chromium] Refactor canvas, plugin, and video drawing to be more data-driven
https://bugs.webkit.org/show_bug.cgi?id=76274

Patch by Tim Dresser <tdresser@chromium.org> on 2012-01-18
Reviewed by James Robinson.

Source/WebCore:

This is the first step in refactoring canvas, plugin, and video drawing.
The CCCustomLayerDrawQuad implementation has been copied to CCCanvasDrawQuad, CCPluginDrawQuad and CCVideoDrawQuad.
All references to CustomLayer have been removed.

As this is a refactor, no new tests were added. CCLayerTreeHostImplTest.blendingOffWhenDrawingOpaqueLayers was modified to
no longer test culling.

* WebCore.gypi:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawQuad):
(WebCore::LayerRendererChromium::drawCanvasQuad):
(WebCore::LayerRendererChromium::drawVideoQuad):
(WebCore::LayerRendererChromium::drawPluginQuad):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/cc/CCCanvasDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp.
(WebCore::CCCanvasDrawQuad::create):
(WebCore::CCCanvasDrawQuad::CCCanvasDrawQuad):
* platform/graphics/chromium/cc/CCCanvasDrawQuad.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h.
(WebCore::CCCanvasDrawQuad::layer):
* platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
(WebCore::CCCanvasLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
* platform/graphics/chromium/cc/CCDrawQuad.cpp:
(WebCore::CCDrawQuad::toCanvasDrawQuad):
(WebCore::CCDrawQuad::toVideoDrawQuad):
(WebCore::CCDrawQuad::toPluginDrawQuad):
* platform/graphics/chromium/cc/CCDrawQuad.h:
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCPluginDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp.
(WebCore::CCPluginDrawQuad::create):
(WebCore::CCPluginDrawQuad::CCPluginDrawQuad):
* platform/graphics/chromium/cc/CCPluginDrawQuad.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h.
(WebCore::CCPluginDrawQuad::layer):
* platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
(WebCore::CCPluginLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCPluginLayerImpl.h:
* platform/graphics/chromium/cc/CCQuadCuller.cpp:
* platform/graphics/chromium/cc/CCVideoDrawQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp.
(WebCore::CCVideoDrawQuad::create):
(WebCore::CCVideoDrawQuad::CCVideoDrawQuad):
* platform/graphics/chromium/cc/CCVideoDrawQuad.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h.
(WebCore::CCVideoDrawQuad::layer):
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCVideoLayerImpl.h:

Source/WebKit/chromium:

No longer test culling in CCLayerTreeHostImplTest.blendingOffWhenDrawingLayers.

* tests/CCLayerTreeHostImplTest.cpp:
(WebKit::BlendStateCheckLayer::appendQuads):
(WebKit::BlendStateCheckLayer::setExpectation):
(WebKit::BlendStateCheckLayer::quadsAppended):
(WebKit::BlendStateCheckLayer::BlendStateCheckLayer):
(WebKit::TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h
Source/WebCore/platform/graphics/chromium/cc/CCCanvasDrawQuad.cpp [moved from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp with 72% similarity]
Source/WebCore/platform/graphics/chromium/cc/CCCanvasDrawQuad.h [new file with mode: 0644]
Source/WebCore/platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCCanvasLayerImpl.h
Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.cpp
Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCPluginDrawQuad.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/chromium/cc/CCPluginDrawQuad.h [moved from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h with 71% similarity]
Source/WebCore/platform/graphics/chromium/cc/CCPluginLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCPluginLayerImpl.h
Source/WebCore/platform/graphics/chromium/cc/CCQuadCuller.cpp
Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.h [new file with mode: 0644]
Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp