[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)
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

index 76d6c4e..b79a589 100644 (file)
@@ -1,3 +1,27 @@
+2012-07-18  Alexandre Elias  <aelias@google.com>
+
+        [chromium] Ubercomp: add id to SharedQuadState
+        https://bugs.webkit.org/show_bug.cgi?id=91670
+
+        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.
+
+        * chromium/public/WebCompositorQuad.h:
+        (WebKit::WebCompositorQuad::sharedQuadStateId):
+        (WebCompositorQuad):
+        * chromium/public/WebCompositorSharedQuadState.h:
+        (WebCompositorSharedQuadState):
+
 2012-07-18  Ryosuke Niwa  <rniwa@webkit.org>
 
         Another Chromium Windows build fix attempt after r123014.
index e2ad0ad..68027fc 100644 (file)
@@ -85,7 +85,8 @@ public:
     unsigned size() const;
 
     const WebCompositorSharedQuadState* sharedQuadState() const { return m_sharedQuadState; }
-    void setSharedQuadState(const WebCompositorSharedQuadState* sharedQuadState) { m_sharedQuadState = sharedQuadState; }
+    int sharedQuadStateId() const { return m_sharedQuadStateId; }
+    void setSharedQuadState(const WebCompositorSharedQuadState*);
 
 protected:
 #if WEBKIT_IMPLEMENTATION
@@ -96,6 +97,7 @@ protected:
     // efficiency. There is special treatment to reconstruct these pointers
     // during serialization.
     const WebCompositorSharedQuadState* m_sharedQuadState;
+    int m_sharedQuadStateId;
 
     Material m_material;
     WebRect m_quadRect;
index 37c6d18..063d407 100644 (file)
@@ -39,6 +39,8 @@ namespace WebKit {
 
 class WebCompositorSharedQuadState {
 public:
+    int id;
+
     // Transforms from quad's original content space to its target content space.
     WebTransformationMatrix quadTransform;
     // This rect lives in the content space for the quad's originating layer.
@@ -51,8 +53,8 @@ public:
     WebCompositorSharedQuadState();
 
 #if WEBKIT_IMPLEMENTATION
-    static PassOwnPtr<WebCompositorSharedQuadState> create(const WebTransformationMatrix& quadTransform, const WebCore::IntRect& visibleContentRect, const WebCore::IntRect& scissorRect, float opacity, bool opaque);
-    WebCompositorSharedQuadState(const WebTransformationMatrix& quadTransform, const WebCore::IntRect& visibleContentRect, const WebCore::IntRect& scissorRect, float opacity, bool opaque);
+    static PassOwnPtr<WebCompositorSharedQuadState> create(int id, const WebTransformationMatrix& quadTransform, const WebCore::IntRect& visibleContentRect, const WebCore::IntRect& scissorRect, float opacity, bool opaque);
+    WebCompositorSharedQuadState(int id, const WebTransformationMatrix& quadTransform, const WebCore::IntRect& visibleContentRect, const WebCore::IntRect& scissorRect, float opacity, bool opaque);
     bool isLayerAxisAlignedIntRect() const;
 #endif
 };
index ce75b82..bc2a1be 100644 (file)
@@ -1,5 +1,46 @@
 2012-07-18  Alexandre Elias  <aelias@google.com>
 
+        [chromium] Ubercomp: add id to SharedQuadState
+        https://bugs.webkit.org/show_bug.cgi?id=91670
+
+        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.
+
+        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):
+
+2012-07-18  Alexandre Elias  <aelias@google.com>
+
         [chromium] Ubercomp: clean up CCRenderer interface
         https://bugs.webkit.org/show_bug.cgi?id=91555
 
index 7a02ca0..6d617cd 100644 (file)
@@ -41,6 +41,7 @@ namespace WebKit {
 
 WebCompositorQuad::WebCompositorQuad(const WebCompositorSharedQuadState* sharedQuadState, Material material, const IntRect& quadRect)
     : m_sharedQuadState(sharedQuadState)
+    , m_sharedQuadStateId(sharedQuadState->id)
     , m_material(material)
     , m_quadRect(quadRect)
     , m_quadVisibleRect(quadRect)
@@ -94,4 +95,10 @@ unsigned WebCompositorQuad::size() const
     return sizeof(WebCompositorQuad);
 }
 
+void WebCompositorQuad::setSharedQuadState(const WebCompositorSharedQuadState* sharedQuadState)
+{
+    m_sharedQuadState = sharedQuadState;
+    m_sharedQuadStateId = sharedQuadState->id;
+}
+
 }
index 313564c..91ef3ea 100644 (file)
@@ -36,18 +36,20 @@ using WebCore::IntRect;
 namespace WebKit {
 
 WebCompositorSharedQuadState::WebCompositorSharedQuadState()
-    : opacity(0)
+    : id(0)
+    , opacity(0)
     , opaque(false)
 {
 }
 
-PassOwnPtr<WebCompositorSharedQuadState> WebCompositorSharedQuadState::create(const WebTransformationMatrix& quadTransform, const IntRect& visibleContentRect, const IntRect& scissorRect, float opacity, bool opaque)
+PassOwnPtr<WebCompositorSharedQuadState> WebCompositorSharedQuadState::create(int id, const WebTransformationMatrix& quadTransform, const IntRect& visibleContentRect, const IntRect& scissorRect, float opacity, bool opaque)
 {
-    return adoptPtr(new WebCompositorSharedQuadState(quadTransform, visibleContentRect, scissorRect, opacity, opaque));
+    return adoptPtr(new WebCompositorSharedQuadState(id, quadTransform, visibleContentRect, scissorRect, opacity, opaque));
 }
 
-WebCompositorSharedQuadState::WebCompositorSharedQuadState(const WebTransformationMatrix& quadTransform, const IntRect& visibleContentRect, const IntRect& scissorRect, float opacity, bool opaque)
-    : quadTransform(quadTransform)
+WebCompositorSharedQuadState::WebCompositorSharedQuadState(int id, const WebTransformationMatrix& quadTransform, const IntRect& visibleContentRect, const IntRect& scissorRect, float opacity, bool opaque)
+    : id(id)
+    , quadTransform(quadTransform)
     , visibleContentRect(visibleContentRect)
     , scissorRect(scissorRect)
     , opacity(opacity)
index 9434dc5..3fff468 100644 (file)
@@ -145,7 +145,7 @@ bool CCLayerImpl::descendantDrawsContent()
     return false;
 }
 
-PassOwnPtr<CCSharedQuadState> CCLayerImpl::createSharedQuadState() const
+PassOwnPtr<CCSharedQuadState> CCLayerImpl::createSharedQuadState(int id) const
 {
     WebTransformationMatrix quadTransformation = drawTransform();
     if (!contentBounds().isEmpty() && !bounds().isEmpty()) {
@@ -154,7 +154,7 @@ PassOwnPtr<CCSharedQuadState> CCLayerImpl::createSharedQuadState() const
         quadTransformation.translate(-contentBounds().width() / 2.0, -contentBounds().height() / 2.0);
     }
 
-    return CCSharedQuadState::create(quadTransformation, m_visibleContentRect, m_scissorRect, m_drawOpacity, m_opaque);
+    return CCSharedQuadState::create(id, quadTransformation, m_visibleContentRect, m_scissorRect, m_drawOpacity, m_opaque);
 }
 
 void CCLayerImpl::willDraw(CCRenderer*, CCGraphicsContext*)
index a5cacd6..08e359d 100644 (file)
@@ -87,7 +87,7 @@ public:
     CCLayerTreeHostImpl* layerTreeHostImpl() const { return m_layerTreeHostImpl; }
     void setLayerTreeHostImpl(CCLayerTreeHostImpl* hostImpl) { m_layerTreeHostImpl = hostImpl; }
 
-    PassOwnPtr<CCSharedQuadState> createSharedQuadState() const;
+    PassOwnPtr<CCSharedQuadState> createSharedQuadState(int id) const;
     // willDraw must be called before appendQuads. If willDraw is called,
     // didDraw is guaranteed to be called before another willDraw or before
     // the layer is destroyed. To enforce this, any class that overrides
index 532665f..d389f2b 100644 (file)
@@ -56,7 +56,7 @@ void CCRenderPass::appendQuadsForLayer(CCLayerImpl* layer, CCOcclusionTrackerImp
 {
     CCQuadCuller quadCuller(m_quadList, layer, occlusionTracker, layer->hasDebugBorders());
 
-    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(m_sharedQuadStateList.size());
     layer->appendDebugBorderQuad(quadCuller, sharedQuadState.get());
     layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
     m_sharedQuadStateList.append(sharedQuadState.release());
@@ -70,7 +70,7 @@ void CCRenderPass::appendQuadsForRenderSurfaceLayer(CCLayerImpl* layer, const CC
 
     CCRenderSurface* surface = layer->renderSurface();
 
-    OwnPtr<CCSharedQuadState> sharedQuadState = surface->createSharedQuadState();
+    OwnPtr<CCSharedQuadState> sharedQuadState = surface->createSharedQuadState(m_sharedQuadStateList.size());
     bool isReplica = false;
     surface->appendQuads(quadCuller, sharedQuadState.get(), isReplica, contributingRenderPass->id());
     m_sharedQuadStateList.append(sharedQuadState.release());
@@ -79,7 +79,7 @@ void CCRenderPass::appendQuadsForRenderSurfaceLayer(CCLayerImpl* layer, const CC
         return;
 
     // Add replica after the surface so that it appears below the surface.
-    OwnPtr<CCSharedQuadState> replicaSharedQuadState = surface->createReplicaSharedQuadState();
+    OwnPtr<CCSharedQuadState> replicaSharedQuadState = surface->createReplicaSharedQuadState(m_sharedQuadStateList.size());
     isReplica = true;
     surface->appendQuads(quadCuller, replicaSharedQuadState.get(), isReplica, contributingRenderPass->id());
     m_sharedQuadStateList.append(replicaSharedQuadState.release());
@@ -96,7 +96,7 @@ void CCRenderPass::appendQuadsToFillScreen(CCLayerImpl* rootLayer, SkColor scree
 
     // Manually create the quad state for the gutter quads, as the root layer
     // doesn't have any bounds and so can't generate this itself.
-    OwnPtr<CCSharedQuadState> sharedQuadState = rootLayer->createSharedQuadState();
+    OwnPtr<CCSharedQuadState> sharedQuadState = rootLayer->createSharedQuadState(m_sharedQuadStateList.size());
     WebTransformationMatrix transformToLayerSpace = rootLayer->screenSpaceTransform().inverse();
     Vector<IntRect> fillRects = fillRegion.rects();
     for (size_t i = 0; i < fillRects.size(); ++i) {
index e726096..82cb547 100644 (file)
@@ -163,16 +163,16 @@ bool CCRenderSurface::surfacePropertyChangedOnlyFromDescendant() const
     return m_surfacePropertyChanged && !m_owningLayer->layerPropertyChanged();
 }
 
-PassOwnPtr<CCSharedQuadState> CCRenderSurface::createSharedQuadState() const
+PassOwnPtr<CCSharedQuadState> CCRenderSurface::createSharedQuadState(int id) const
 {
     bool isOpaque = false;
-    return CCSharedQuadState::create(m_originTransform, m_contentRect, m_scissorRect, m_drawOpacity, isOpaque);
+    return CCSharedQuadState::create(id, m_originTransform, m_contentRect, m_scissorRect, m_drawOpacity, isOpaque);
 }
 
-PassOwnPtr<CCSharedQuadState> CCRenderSurface::createReplicaSharedQuadState() const
+PassOwnPtr<CCSharedQuadState> CCRenderSurface::createReplicaSharedQuadState(int id) const
 {
     bool isOpaque = false;
-    return CCSharedQuadState::create(m_replicaOriginTransform, m_contentRect, m_scissorRect, m_drawOpacity, isOpaque);
+    return CCSharedQuadState::create(id, m_replicaOriginTransform, m_contentRect, m_scissorRect, m_drawOpacity, isOpaque);
 }
 
 FloatRect CCRenderSurface::computeRootScissorRectInCurrentSurface(const FloatRect& rootScissorRect) const
index 9f7d876..1ac3400 100644 (file)
@@ -114,8 +114,8 @@ public:
 
     CCDamageTracker* damageTracker() const { return m_damageTracker.get(); }
 
-    PassOwnPtr<CCSharedQuadState> createSharedQuadState() const;
-    PassOwnPtr<CCSharedQuadState> createReplicaSharedQuadState() const;
+    PassOwnPtr<CCSharedQuadState> createSharedQuadState(int id) const;
+    PassOwnPtr<CCSharedQuadState> createReplicaSharedQuadState(int id) const;
 
     void appendQuads(CCQuadCuller&, CCSharedQuadState*, bool forReplica, int renderPassId);
 
index 1b79ac8..0c161eb 100644 (file)
@@ -1,3 +1,30 @@
+2012-07-18  Alexandre Elias  <aelias@google.com>
+
+        [chromium] Ubercomp: add id to SharedQuadState
+        https://bugs.webkit.org/show_bug.cgi?id=91670
+
+        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.
+
+        * tests/CCLayerTreeHostImplTest.cpp:
+        * tests/CCQuadCullerTest.cpp:
+        * tests/CCRenderSurfaceTest.cpp:
+        * tests/CCSolidColorLayerImplTest.cpp:
+        (CCLayerTestCommon::TEST):
+        * tests/CCTiledLayerImplTest.cpp:
+        (CCLayerTestCommon::TEST):
+        (CCLayerTestCommon::getQuads):
+
 2012-07-18  Nate Chapin  <japhet@chromium.org>
 
         Add WebTextInputType enum values for text areas and
index f842727..49074fe 100644 (file)
@@ -3020,7 +3020,7 @@ static void configureRenderPassTestData(const char* testScript, RenderPassRemova
     renderer->clearCachedTextures();
 
     // One shared state for all quads - we don't need the correct details
-    testData.sharedQuadState = CCSharedQuadState::create(WebTransformationMatrix(), IntRect(), IntRect(), 1.0, true);
+    testData.sharedQuadState = CCSharedQuadState::create(0, WebTransformationMatrix(), IntRect(), IntRect(), 1.0, true);
 
     const char* currentChar = testScript;
 
index a268040..5673179 100644 (file)
@@ -98,7 +98,7 @@ static void appendQuads(CCQuadList& quadList, Vector<OwnPtr<CCSharedQuadState> >
 {
     occlusionTracker.enterLayer(it);
     CCQuadCuller quadCuller(quadList, layer, &occlusionTracker, false);
-    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(0);
     bool hadMissingTiles = false;
     layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
     sharedStateList.append(sharedQuadState.release());
index e9e0417..a989cd6 100644 (file)
@@ -112,7 +112,7 @@ TEST(CCRenderSurfaceTest, sanityCheckSurfaceCreatesCorrectSharedQuadState)
     renderSurface->setScissorRect(clipRect);
     renderSurface->setDrawOpacity(1);
 
-    OwnPtr<CCSharedQuadState> sharedQuadState = renderSurface->createSharedQuadState();
+    OwnPtr<CCSharedQuadState> sharedQuadState = renderSurface->createSharedQuadState(0);
 
     EXPECT_EQ(30, sharedQuadState->quadTransform.m41());
     EXPECT_EQ(40, sharedQuadState->quadTransform.m42());
index f9a9292..1754a5b 100644 (file)
@@ -52,7 +52,7 @@ TEST(CCSolidColorLayerImplTest, verifyTilingCompleteAndNoOverlap)
     layer->setBounds(layerSize);
     layer->setContentBounds(layerSize);
 
-    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(0);
     bool hadMissingTiles = false;
     layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
 
@@ -75,7 +75,7 @@ TEST(CCSolidColorLayerImplTest, verifyCorrectBackgroundColorInQuad)
     layer->setContentBounds(layerSize);
     layer->setBackgroundColor(testColor);
 
-    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(0);
     bool hadMissingTiles = false;
     layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
 
@@ -99,7 +99,7 @@ TEST(CCSolidColorLayerImplTest, verifyCorrectOpacityInQuad)
     layer->setContentBounds(layerSize);
     layer->setDrawOpacity(opacity);
 
-    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(0);
     bool hadMissingTiles = false;
     layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
 
index 00d38a7..9102815 100644 (file)
@@ -74,7 +74,7 @@ TEST(CCTiledLayerImplTest, emptyQuadList)
     {
         OwnPtr<CCTiledLayerImpl> layer = createLayer(tileSize, layerSize, CCLayerTilingData::NoBorderTexels);
         MockCCQuadCuller quadCuller;
-        OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+        OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(0);
         bool hadMissingTiles = false;
         layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
         const unsigned numTiles = numTilesX * numTilesY;
@@ -87,7 +87,7 @@ TEST(CCTiledLayerImplTest, emptyQuadList)
         layer->setVisibleContentRect(IntRect());
 
         MockCCQuadCuller quadCuller;
-        OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+        OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(0);
         bool hadMissingTiles = false;
         layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
         EXPECT_EQ(quadCuller.quadList().size(), 0u);
@@ -101,7 +101,7 @@ TEST(CCTiledLayerImplTest, emptyQuadList)
         layer->setVisibleContentRect(outsideBounds);
 
         MockCCQuadCuller quadCuller;
-        OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+        OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(0);
         bool hadMissingTiles = false;
         layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
         EXPECT_EQ(quadCuller.quadList().size(), 0u);
@@ -113,7 +113,7 @@ TEST(CCTiledLayerImplTest, emptyQuadList)
         layer->setSkipsDraw(true);
 
         MockCCQuadCuller quadCuller;
-        OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+        OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(0);
         bool hadMissingTiles = false;
         layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
         EXPECT_EQ(quadCuller.quadList().size(), 0u);
@@ -130,7 +130,7 @@ TEST(CCTiledLayerImplTest, checkerboarding)
     const IntSize layerSize(tileSize.width() * numTilesX, tileSize.height() * numTilesY);
 
     OwnPtr<CCTiledLayerImpl> layer = createLayer(tileSize, layerSize, CCLayerTilingData::NoBorderTexels);
-    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(0);
 
     // No checkerboarding
     {
@@ -167,7 +167,7 @@ static PassOwnPtr<CCSharedQuadState> getQuads(CCQuadList& quads, IntSize tileSiz
     layer->setBounds(layerSize);
 
     MockCCQuadCuller quadCuller(quads);
-    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
+    OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState(0);
     bool hadMissingTiles = false;
     layer->appendQuads(quadCuller, sharedQuadState.get(), hadMissingTiles);
     return sharedQuadState.release(); // The shared data must be owned as long as the quad list exists.