Index: cc/CCTiledLayerImpl.cpp |
diff --git a/cc/CCTiledLayerImpl.cpp b/cc/CCTiledLayerImpl.cpp |
index a5d3ceadbdc63fce08ec4c9927baa9a962e80046..8db9b04bf198786f1cd9312ad3c376f9412aede8 100644 |
--- a/cc/CCTiledLayerImpl.cpp |
+++ b/cc/CCTiledLayerImpl.cpp |
@@ -8,6 +8,7 @@ |
#include "CCTiledLayerImpl.h" |
+#include "CCAppendQuadsData.h" |
#include "CCCheckerboardDrawQuad.h" |
#include "CCDebugBorderDrawQuad.h" |
#include "CCLayerTilingData.h" |
@@ -104,7 +105,7 @@ DrawableTile* CCTiledLayerImpl::createTile(int i, int j) |
return addedTile; |
} |
-void CCTiledLayerImpl::appendQuads(CCQuadSink& quadSink, bool& hadMissingTiles) |
+void CCTiledLayerImpl::appendQuads(CCQuadSink& quadSink, CCAppendQuadsData& appendQuadsData) |
{ |
const IntRect& contentRect = visibleContentRect(); |
@@ -112,7 +113,7 @@ void CCTiledLayerImpl::appendQuads(CCQuadSink& quadSink, bool& hadMissingTiles) |
return; |
CCSharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQuadState()); |
- appendDebugBorderQuad(quadSink, sharedQuadState); |
+ appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData); |
int left, top, right, bottom; |
m_tiler->contentRectToTileIndices(contentRect, left, top, right, bottom); |
@@ -128,7 +129,7 @@ void CCTiledLayerImpl::appendQuads(CCQuadSink& quadSink, bool& hadMissingTiles) |
borderColor = SkColorSetARGB(debugTileBorderAlpha, debugTileBorderMissingTileColorRed, debugTileBorderMissingTileColorGreen, debugTileBorderMissingTileColorBlue); |
else |
borderColor = SkColorSetARGB(debugTileBorderAlpha, debugTileBorderColorRed, debugTileBorderColorGreen, debugTileBorderColorBlue); |
- quadSink.append(CCDebugBorderDrawQuad::create(sharedQuadState, tileRect, borderColor, debugTileBorderWidth)); |
+ quadSink.append(CCDebugBorderDrawQuad::create(sharedQuadState, tileRect, borderColor, debugTileBorderWidth), appendQuadsData); |
} |
} |
} |
@@ -149,9 +150,9 @@ void CCTiledLayerImpl::appendQuads(CCQuadSink& quadSink, bool& hadMissingTiles) |
if (!tile || !tile->resourceId()) { |
if (drawCheckerboardForMissingTiles()) |
- hadMissingTiles |= quadSink.append(CCCheckerboardDrawQuad::create(sharedQuadState, tileRect)); |
+ appendQuadsData.hadMissingTiles |= quadSink.append(CCCheckerboardDrawQuad::create(sharedQuadState, tileRect), appendQuadsData); |
else |
- hadMissingTiles |= quadSink.append(CCSolidColorDrawQuad::create(sharedQuadState, tileRect, backgroundColor())); |
+ appendQuadsData.hadMissingTiles |= quadSink.append(CCSolidColorDrawQuad::create(sharedQuadState, tileRect, backgroundColor()), appendQuadsData); |
continue; |
} |
@@ -177,7 +178,7 @@ void CCTiledLayerImpl::appendQuads(CCQuadSink& quadSink, bool& hadMissingTiles) |
bool bottomEdgeAA = j == m_tiler->numTilesY() - 1 && useAA; |
const GC3Dint textureFilter = m_tiler->hasBorderTexels() ? GraphicsContext3D::LINEAR : GraphicsContext3D::NEAREST; |
- quadSink.append(CCTileDrawQuad::create(sharedQuadState, tileRect, tileOpaqueRect, tile->resourceId(), textureOffset, textureSize, textureFilter, contentsSwizzled(), leftEdgeAA, topEdgeAA, rightEdgeAA, bottomEdgeAA)); |
+ quadSink.append(CCTileDrawQuad::create(sharedQuadState, tileRect, tileOpaqueRect, tile->resourceId(), textureOffset, textureSize, textureFilter, contentsSwizzled(), leftEdgeAA, topEdgeAA, rightEdgeAA, bottomEdgeAA), appendQuadsData); |
} |
} |
} |