[chromium] Ubercomp: add id to SharedQuadState
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jul 2012 22:57:02 +0000 (22:57 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jul 2012 22:57:02 +0000 (22:57 +0000)
commit01c9e23517ab67c9f13e89df9933ac20c887fd1f
treecf6a459e3f31ea06725d4ae4968f4e1f25695a93
parent88f019ff680b68e9e4267f85c0359bfb432877b7
[chromium] Ubercomp: add id to SharedQuadState
https://bugs.webkit.org/show_bug.cgi?id=91670

Patch by Alexandre Elias <aelias@google.com> on 2012-07-18
Reviewed by Adrienne Walker.

This assigns an integer ID to SharedQuadState objects and a
corresponding ID to quads.  This ID is unique only within a
RenderPass and currently is just set to the index in the shared quad
state list.  This is redundant with the pointer and exists to
simplify serialization.

I found out that pointer rewriting within a pickler is blocked by
pointers to memory being const there, so the reassignment will have to
be performed in the application layer anyway.  In that case, it's
simplest to add some ID integers.

Source/Platform:

* chromium/public/WebCompositorQuad.h:
(WebKit::WebCompositorQuad::sharedQuadStateId):
(WebCompositorQuad):
* chromium/public/WebCompositorSharedQuadState.h:
(WebCompositorSharedQuadState):

Source/WebCore:

No new tests (will introduce them when making use of the ID).

* platform/chromium/support/WebCompositorQuad.cpp:
(WebKit::WebCompositorQuad::WebCompositorQuad):
(WebKit::WebCompositorQuad::setSharedQuadState):
(WebKit):
* platform/chromium/support/WebCompositorSharedQuadState.cpp:
(WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState):
(WebKit::WebCompositorSharedQuadState::create):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::createSharedQuadState):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(CCLayerImpl):
* platform/graphics/chromium/cc/CCRenderPass.cpp:
(WebCore::CCRenderPass::appendQuadsForLayer):
(WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
(WebCore::CCRenderPass::appendQuadsToFillScreen):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::createSharedQuadState):
(WebCore::CCRenderSurface::createReplicaSharedQuadState):
* platform/graphics/chromium/cc/CCRenderSurface.h:
(CCRenderSurface):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:
* tests/CCQuadCullerTest.cpp:
* tests/CCRenderSurfaceTest.cpp:
* tests/CCSolidColorLayerImplTest.cpp:
(CCLayerTestCommon::TEST):
* tests/CCTiledLayerImplTest.cpp:
(CCLayerTestCommon::TEST):
(CCLayerTestCommon::getQuads):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/Platform/ChangeLog
Source/Platform/chromium/public/WebCompositorQuad.h
Source/Platform/chromium/public/WebCompositorSharedQuadState.h
Source/WebCore/ChangeLog
Source/WebCore/platform/chromium/support/WebCompositorQuad.cpp
Source/WebCore/platform/chromium/support/WebCompositorSharedQuadState.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h
Source/WebCore/platform/graphics/chromium/cc/CCRenderPass.cpp
Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.cpp
Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
Source/WebKit/chromium/tests/CCQuadCullerTest.cpp
Source/WebKit/chromium/tests/CCRenderSurfaceTest.cpp
Source/WebKit/chromium/tests/CCSolidColorLayerImplTest.cpp
Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp