| 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/quads/shared_quad_state.h" | 10 #include "cc/quads/shared_quad_state.h" |
| 11 #include "cc/resources/resource_provider.h" | 11 #include "cc/resources/resource_provider.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 namespace trace_event { |
| 15 class TracedValue; |
| 16 } |
| 17 |
| 18 // TODO(ssid): remove these aliases after the tracing clients are moved to the |
| 19 // new trace_event namespace. See crbug.com/451032. ETA: March 2015 |
| 14 namespace debug { | 20 namespace debug { |
| 15 class TracedValue; | 21 using ::base::trace_event::TracedValue; |
| 16 } | 22 } |
| 17 class Value; | 23 class Value; |
| 18 class DictionaryValue; | 24 class DictionaryValue; |
| 19 } | 25 } // namespace base |
| 20 | 26 |
| 21 namespace cc { | 27 namespace cc { |
| 22 | 28 |
| 23 // DrawQuad is a bag of data used for drawing a quad. Because different | 29 // DrawQuad is a bag of data used for drawing a quad. Because different |
| 24 // materials need different bits of per-quad data to render, classes that derive | 30 // materials need different bits of per-quad data to render, classes that derive |
| 25 // from DrawQuad store additional data in their derived instance. The Material | 31 // from DrawQuad store additional data in their derived instance. The Material |
| 26 // enum is used to "safely" downcast to the derived class. | 32 // enum is used to "safely" downcast to the derived class. |
| 27 // Note: quads contain rects and sizes, which live in different spaces. There is | 33 // Note: quads contain rects and sizes, which live in different spaces. There is |
| 28 // the "content space", which is the arbitrary space in which the quad's | 34 // the "content space", which is the arbitrary space in which the quad's |
| 29 // geometry is defined (generally related to the layer that produced the quad, | 35 // geometry is defined (generally related to the layer that produced the quad, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 const gfx::Rect& rect, | 142 const gfx::Rect& rect, |
| 137 const gfx::Rect& opaque_rect, | 143 const gfx::Rect& opaque_rect, |
| 138 const gfx::Rect& visible_rect, | 144 const gfx::Rect& visible_rect, |
| 139 bool needs_blending); | 145 bool needs_blending); |
| 140 virtual void ExtendValue(base::debug::TracedValue* value) const = 0; | 146 virtual void ExtendValue(base::debug::TracedValue* value) const = 0; |
| 141 }; | 147 }; |
| 142 | 148 |
| 143 } // namespace cc | 149 } // namespace cc |
| 144 | 150 |
| 145 #endif // CC_QUADS_DRAW_QUAD_H_ | 151 #endif // CC_QUADS_DRAW_QUAD_H_ |
| OLD | NEW |