| Index: cc/draw_quad.h
|
| diff --git a/cc/draw_quad.h b/cc/draw_quad.h
|
| index df62c7b05bae5f0591746fe4de83aa2815a93b81..d6b9b40df150fba060627bf63622e89ef9b221ee 100644
|
| --- a/cc/draw_quad.h
|
| +++ b/cc/draw_quad.h
|
| @@ -67,6 +67,7 @@ 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);
|
| @@ -76,6 +77,32 @@ class CC_EXPORT DrawQuad {
|
| ResourceProvider::ResourceId)> ResourceIteratorCallback;
|
| virtual void IterateResources(const ResourceIteratorCallback& callback) = 0;
|
|
|
| + // Is the left edge of this tile aligned with the originating layer's
|
| + // left edge?
|
| + bool IsLeftEdge() const { return !rect.x(); }
|
| +
|
| + // Is the top edge of this tile aligned with the originating layer's
|
| + // top edge?
|
| + bool IsTopEdge() const { return !rect.y(); }
|
| +
|
| + // Is the right edge of this tile aligned with the originating layer's
|
| + // 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
|
| + // 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
|
| + // corresponding edge?
|
| + bool IsEdge() const {
|
| + return IsLeftEdge() || IsTopEdge() || IsRightEdge() || IsBottomEdge();
|
| + }
|
| +
|
| protected:
|
| DrawQuad();
|
|
|
|
|