| Index: cc/tiled_layer_impl.cc
|
| diff --git a/cc/tiled_layer_impl.cc b/cc/tiled_layer_impl.cc
|
| index f76faad5fe5c042524ecd5e97ef2147a1698611e..2eb3dffcdfeed89b47131df8661d2d1e499b3cb9 100644
|
| --- a/cc/tiled_layer_impl.cc
|
| +++ b/cc/tiled_layer_impl.cc
|
| @@ -162,6 +162,16 @@ void TiledLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQuad
|
| if (tileRect.IsEmpty())
|
| continue;
|
|
|
| + bool clipped = false;
|
| + gfx::QuadF visibleContentInTargetQuad = MathUtil::mapQuad(drawTransform(), gfx::QuadF(visibleContentRect()), clipped);
|
| + bool isAxisAlignedInTarget = !clipped && visibleContentInTargetQuad.IsRectilinear();
|
| + bool useAA = m_tiler->hasBorderTexels() && !isAxisAlignedInTarget;
|
| +
|
| + bool leftEdgeAA = !i && useAA;
|
| + bool topEdgeAA = !j && useAA;
|
| + bool rightEdgeAA = i == m_tiler->numTilesX() - 1 && useAA;
|
| + bool bottomEdgeAA = j == m_tiler->numTilesY() - 1 && useAA;
|
| +
|
| if (!tile || !tile->resourceId()) {
|
| if (drawCheckerboardForMissingTiles()) {
|
| SkColor checkerColor;
|
| @@ -176,7 +186,7 @@ void TiledLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQuad
|
| appendQuadsData.numMissingTiles++;
|
| } else {
|
| scoped_ptr<SolidColorDrawQuad> solidColorQuad = SolidColorDrawQuad::Create();
|
| - solidColorQuad->SetNew(sharedQuadState, tileRect, backgroundColor());
|
| + solidColorQuad->SetNew(sharedQuadState, tileRect, DrawQuad::AntiAliasing(leftEdgeAA, topEdgeAA, rightEdgeAA, bottomEdgeAA), backgroundColor());
|
| if (quadSink.append(solidColorQuad.PassAs<DrawQuad>(), appendQuadsData))
|
| appendQuadsData.numMissingTiles++;
|
| }
|
| @@ -195,18 +205,8 @@ void TiledLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQuad
|
| float tileHeight = static_cast<float>(m_tiler->tileSize().height());
|
| gfx::Size textureSize(tileWidth, tileHeight);
|
|
|
| - bool clipped = false;
|
| - gfx::QuadF visibleContentInTargetQuad = MathUtil::mapQuad(drawTransform(), gfx::QuadF(visibleContentRect()), clipped);
|
| - bool isAxisAlignedInTarget = !clipped && visibleContentInTargetQuad.IsRectilinear();
|
| - bool useAA = m_tiler->hasBorderTexels() && !isAxisAlignedInTarget;
|
| -
|
| - bool leftEdgeAA = !i && useAA;
|
| - bool topEdgeAA = !j && useAA;
|
| - bool rightEdgeAA = i == m_tiler->numTilesX() - 1 && useAA;
|
| - bool bottomEdgeAA = j == m_tiler->numTilesY() - 1 && useAA;
|
| -
|
| scoped_ptr<TileDrawQuad> quad = TileDrawQuad::Create();
|
| - quad->SetNew(sharedQuadState, tileRect, tileOpaqueRect, tile->resourceId(), texCoordRect, textureSize, tile->contentsSwizzled(), leftEdgeAA, topEdgeAA, rightEdgeAA, bottomEdgeAA);
|
| + quad->SetNew(sharedQuadState, tileRect, tileOpaqueRect, DrawQuad::AntiAliasing(leftEdgeAA, topEdgeAA, rightEdgeAA, bottomEdgeAA), tile->resourceId(), texCoordRect, textureSize, tile->contentsSwizzled());
|
| quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData);
|
| }
|
| }
|
|
|