Chromium Code Reviews| Index: cc/draw_quad.h |
| diff --git a/cc/draw_quad.h b/cc/draw_quad.h |
| index dc87a5d96a0d2ffe4a55b3819ca5f4db5733d058..81af70a774aa6ce1e0565eb77f6b297a7602e597 100644 |
| --- a/cc/draw_quad.h |
| +++ b/cc/draw_quad.h |
| @@ -66,11 +66,38 @@ class CC_EXPORT DrawQuad { |
| const SharedQuadState* shared_quad_state; |
| bool IsDebugQuad() const { return material == DEBUG_BORDER; } |
| + |
| bool ShouldDrawWithBlending() const { |
| return needs_blending || shared_quad_state->opacity < 1.0f || |
| !opaque_rect.Contains(visible_rect); |
| } |
| + // Is the left edge of this tile aligned with the originating layer's |
|
reveman
2013/02/26 01:49:28
nit: remove whitespace at end of line.
ernstm
2013/02/26 18:10:57
Done.
|
| + // left edge? |
| + bool IsLeftEdge() const { return !rect.x(); } |
| + |
| + // Is the top edge of this tile aligned with the originating layer's |
|
reveman
2013/02/26 01:49:28
nit: remove whitespace at end of line.
ernstm
2013/02/26 18:10:57
Done.
|
| + // top edge? |
| + bool IsTopEdge() const { return !rect.y(); } |
| + |
| + // Is the right edge of this tile aligned with the originating layer's |
|
reveman
2013/02/26 01:49:28
nit: remove whitespace at end of line.
ernstm
2013/02/26 18:10:57
Done.
|
| + // right edge? |
| + bool IsRightEdge() const { |
| + return rect.right() == shared_quad_state->content_bounds.width(); |
| + } |
| + |
| + // Is the bottom edge of this tile aligned with the originating layer's |
|
reveman
2013/02/26 01:49:28
nit: remove whitespace at end of line.
ernstm
2013/02/26 18:10:57
Done.
|
| + // bottom edge? |
| + bool IsBottomEdge() const { |
| + return rect.bottom() == shared_quad_state->content_bounds.height(); |
| + } |
| + |
| + // Is any edge of this tile aligned with the originating layer's |
|
reveman
2013/02/26 01:49:28
nit: remove whitespace at end of line.
ernstm
2013/02/26 18:10:57
Done.
|
| + // corresponding edge? |
| + bool IsEdge() const { |
|
reveman
2013/02/26 01:49:28
nit: remove whitespace at end of line.
ernstm
2013/02/26 18:10:57
Done.
ernstm
2013/02/26 18:10:57
Done.
|
| + return IsLeftEdge() || IsTopEdge() || IsRightEdge() || IsBottomEdge(); |
|
reveman
2013/02/26 01:49:28
nit: remove whitespace at end of line.
ernstm
2013/02/26 18:10:57
Done.
ernstm
2013/02/26 18:10:57
Done.
|
| + } |
| + |
| virtual void AppendResources(ResourceProvider::ResourceIdArray* resources); |
| protected: |