| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_QUADS_DRAW_QUAD_H_ | 5 #ifndef CC_QUADS_DRAW_QUAD_H_ |
| 6 #define CC_QUADS_DRAW_QUAD_H_ | 6 #define CC_QUADS_DRAW_QUAD_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
| 10 #include "cc/base/resource_id.h" | 10 #include "cc/base/resource_id.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // left edge? | 89 // left edge? |
| 90 bool IsLeftEdge() const { return !rect.x(); } | 90 bool IsLeftEdge() const { return !rect.x(); } |
| 91 | 91 |
| 92 // Is the top edge of this tile aligned with the originating layer's | 92 // Is the top edge of this tile aligned with the originating layer's |
| 93 // top edge? | 93 // top edge? |
| 94 bool IsTopEdge() const { return !rect.y(); } | 94 bool IsTopEdge() const { return !rect.y(); } |
| 95 | 95 |
| 96 // Is the right edge of this tile aligned with the originating layer's | 96 // Is the right edge of this tile aligned with the originating layer's |
| 97 // right edge? | 97 // right edge? |
| 98 bool IsRightEdge() const { | 98 bool IsRightEdge() const { |
| 99 return rect.right() == shared_quad_state->content_bounds.width(); | 99 return rect.right() == shared_quad_state->quad_layer_bounds.width(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 // Is the bottom edge of this tile aligned with the originating layer's | 102 // Is the bottom edge of this tile aligned with the originating layer's |
| 103 // bottom edge? | 103 // bottom edge? |
| 104 bool IsBottomEdge() const { | 104 bool IsBottomEdge() const { |
| 105 return rect.bottom() == shared_quad_state->content_bounds.height(); | 105 return rect.bottom() == shared_quad_state->quad_layer_bounds.height(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 // Is any edge of this tile aligned with the originating layer's | 108 // Is any edge of this tile aligned with the originating layer's |
| 109 // corresponding edge? | 109 // corresponding edge? |
| 110 bool IsEdge() const { | 110 bool IsEdge() const { |
| 111 return IsLeftEdge() || IsTopEdge() || IsRightEdge() || IsBottomEdge(); | 111 return IsLeftEdge() || IsTopEdge() || IsRightEdge() || IsBottomEdge(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void AsValueInto(base::trace_event::TracedValue* value) const; | 114 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 115 | 115 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 137 const gfx::Rect& rect, | 137 const gfx::Rect& rect, |
| 138 const gfx::Rect& opaque_rect, | 138 const gfx::Rect& opaque_rect, |
| 139 const gfx::Rect& visible_rect, | 139 const gfx::Rect& visible_rect, |
| 140 bool needs_blending); | 140 bool needs_blending); |
| 141 virtual void ExtendValue(base::trace_event::TracedValue* value) const = 0; | 141 virtual void ExtendValue(base::trace_event::TracedValue* value) const = 0; |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 } // namespace cc | 144 } // namespace cc |
| 145 | 145 |
| 146 #endif // CC_QUADS_DRAW_QUAD_H_ | 146 #endif // CC_QUADS_DRAW_QUAD_H_ |
| OLD | NEW |