| Index: cc/solid_color_layer_impl.cc
|
| diff --git a/cc/solid_color_layer_impl.cc b/cc/solid_color_layer_impl.cc
|
| index 1d5ed516fdbc52946389423d46a1eb75d9121085..70b7b3ea2ff0eb0b42c8073fe8d0f6ffcc44da57 100644
|
| --- a/cc/solid_color_layer_impl.cc
|
| +++ b/cc/solid_color_layer_impl.cc
|
| @@ -4,8 +4,10 @@
|
|
|
| #include "cc/solid_color_layer_impl.h"
|
|
|
| +#include "cc/math_util.h"
|
| #include "cc/quad_sink.h"
|
| #include "cc/solid_color_draw_quad.h"
|
| +#include "ui/gfx/quad_f.h"
|
|
|
| namespace cc {
|
|
|
| @@ -31,8 +33,19 @@ void SolidColorLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appen
|
| for (int x = 0; x < width; x += m_tileSize) {
|
| for (int y = 0; y < height; y += m_tileSize) {
|
| gfx::Rect solidTileRect(x, y, std::min(width - x, m_tileSize), std::min(height - y, m_tileSize));
|
| +
|
| + bool clipped = false;
|
| + gfx::QuadF visibleContentInTargetQuad = MathUtil::mapQuad(drawTransform(), gfx::QuadF(visibleContentRect()), clipped);
|
| + bool isAxisAlignedInTarget = !clipped && visibleContentInTargetQuad.IsRectilinear();
|
| + bool useAA = !isAxisAlignedInTarget;
|
| +
|
| + bool leftEdgeAA = !x && useAA;
|
| + bool topEdgeAA = !y && useAA;
|
| + bool rightEdgeAA = x >= width - m_tileSize && useAA;
|
| + bool bottomEdgeAA = y >= height - m_tileSize && useAA;
|
| +
|
| scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create();
|
| - quad->SetNew(sharedQuadState, solidTileRect, backgroundColor());
|
| + quad->SetNew(sharedQuadState, solidTileRect, DrawQuad::AntiAliasing(leftEdgeAA, topEdgeAA, rightEdgeAA, bottomEdgeAA), backgroundColor());
|
| quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData);
|
| }
|
| }
|
|
|