| Index: cc/solid_color_draw_quad.cc
|
| diff --git a/cc/solid_color_draw_quad.cc b/cc/solid_color_draw_quad.cc
|
| index 54a9b75166f1587067c34f79dfe44edee047901a..b4cf9ec3fcdd694f5a608687d228d3c0aa2e73ac 100644
|
| --- a/cc/solid_color_draw_quad.cc
|
| +++ b/cc/solid_color_draw_quad.cc
|
| @@ -8,7 +8,8 @@
|
|
|
| namespace cc {
|
|
|
| -SolidColorDrawQuad::SolidColorDrawQuad() : color(0) {}
|
| +SolidColorDrawQuad::SolidColorDrawQuad() : color(0) {
|
| +}
|
|
|
| scoped_ptr<SolidColorDrawQuad> SolidColorDrawQuad::Create() {
|
| return make_scoped_ptr(new SolidColorDrawQuad);
|
| @@ -16,13 +17,17 @@ scoped_ptr<SolidColorDrawQuad> SolidColorDrawQuad::Create() {
|
|
|
| void SolidColorDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
|
| gfx::Rect rect,
|
| + AntiAliasing anti_aliasing,
|
| SkColor color) {
|
| gfx::Rect opaque_rect = SkColorGetA(color) == 255 ? rect : gfx::Rect();
|
| gfx::Rect visible_rect = rect;
|
| bool needs_blending = false;
|
| DrawQuad::SetAll(shared_quad_state, DrawQuad::SOLID_COLOR, rect, opaque_rect,
|
| - visible_rect, needs_blending);
|
| + visible_rect, needs_blending, anti_aliasing);
|
| this->color = color;
|
| +
|
| + // Override needs_blending after initializing the quad.
|
| + this->needs_blending = IsAntialiased();
|
| }
|
|
|
| void SolidColorDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
|
| @@ -30,9 +35,10 @@ void SolidColorDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
|
| gfx::Rect opaque_rect,
|
| gfx::Rect visible_rect,
|
| bool needs_blending,
|
| + AntiAliasing anti_aliasing,
|
| SkColor color) {
|
| DrawQuad::SetAll(shared_quad_state, DrawQuad::SOLID_COLOR, rect, opaque_rect,
|
| - visible_rect, needs_blending);
|
| + visible_rect, needs_blending, anti_aliasing);
|
| this->color = color;
|
| }
|
|
|
|
|