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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 struct CC_EXPORT Resources { | 117 struct CC_EXPORT Resources { |
118 enum : size_t { kMaxResourceIdCount = 4 }; | 118 enum : size_t { kMaxResourceIdCount = 4 }; |
119 Resources(); | 119 Resources(); |
120 | 120 |
121 ResourceId* begin() { return ids; } | 121 ResourceId* begin() { return ids; } |
122 ResourceId* end() { | 122 ResourceId* end() { |
123 DCHECK_LE(count, kMaxResourceIdCount); | 123 DCHECK_LE(count, kMaxResourceIdCount); |
124 return ids + count; | 124 return ids + count; |
125 } | 125 } |
126 | 126 |
127 size_t count; | 127 uint32_t count; |
128 ResourceId ids[kMaxResourceIdCount]; | 128 ResourceId ids[kMaxResourceIdCount]; |
129 }; | 129 }; |
130 | 130 |
131 Resources resources; | 131 Resources resources; |
132 | 132 |
133 protected: | 133 protected: |
134 DrawQuad(); | 134 DrawQuad(); |
135 | 135 |
136 void SetAll(const SharedQuadState* shared_quad_state, | 136 void SetAll(const SharedQuadState* shared_quad_state, |
137 Material material, | 137 Material material, |
138 const gfx::Rect& rect, | 138 const gfx::Rect& rect, |
139 const gfx::Rect& opaque_rect, | 139 const gfx::Rect& opaque_rect, |
140 const gfx::Rect& visible_rect, | 140 const gfx::Rect& visible_rect, |
141 bool needs_blending); | 141 bool needs_blending); |
142 virtual void ExtendValue(base::trace_event::TracedValue* value) const = 0; | 142 virtual void ExtendValue(base::trace_event::TracedValue* value) const = 0; |
143 }; | 143 }; |
144 | 144 |
145 } // namespace cc | 145 } // namespace cc |
146 | 146 |
147 #endif // CC_QUADS_DRAW_QUAD_H_ | 147 #endif // CC_QUADS_DRAW_QUAD_H_ |
OLD | NEW |