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_DRAW_QUAD_H_ | 5 #ifndef CC_DRAW_QUAD_H_ |
6 #define CC_DRAW_QUAD_H_ | 6 #define CC_DRAW_QUAD_H_ |
7 | 7 |
8 #include "cc/cc_export.h" | 8 #include "cc/cc_export.h" |
9 #include "cc/resource_provider.h" | 9 #include "cc/resource_provider.h" |
10 #include "cc/shared_quad_state.h" | 10 #include "cc/shared_quad_state.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 | 13 |
14 // DrawQuad is a bag of data used for drawing a quad. Because different | 14 // DrawQuad is a bag of data used for drawing a quad. Because different |
15 // materials need different bits of per-quad data to render, classes that derive | 15 // materials need different bits of per-quad data to render, classes that derive |
16 // from DrawQuad store additional data in their derived instance. The Material | 16 // from DrawQuad store additional data in their derived instance. The Material |
17 // enum is used to "safely" downcast to the derived class. | 17 // enum is used to "safely" downcast to the derived class. |
18 class CC_EXPORT DrawQuad { | 18 class CC_EXPORT DrawQuad { |
19 public: | 19 public: |
20 enum Material { | 20 enum Material { |
21 INVALID, | 21 INVALID, |
22 CHECKERBOARD, | 22 CHECKERBOARD, |
23 DEBUG_BORDER, | 23 DEBUG_BORDER, |
24 IO_SURFACE_CONTENT, | 24 IO_SURFACE_CONTENT, |
25 RENDER_PASS, | 25 RENDER_PASS, |
26 TEXTURE_CONTENT, | 26 TEXTURE_CONTENT, |
27 SOLID_COLOR, | 27 SOLID_COLOR, |
28 TILED_CONTENT, | 28 TILED_CONTENT, |
29 YUV_VIDEO_CONTENT, | 29 YUV_VIDEO_CONTENT, |
| 30 YUVA_VIDEO_CONTENT, |
30 STREAM_VIDEO_CONTENT, | 31 STREAM_VIDEO_CONTENT, |
31 }; | 32 }; |
32 | 33 |
33 virtual ~DrawQuad(); | 34 virtual ~DrawQuad(); |
34 | 35 |
35 scoped_ptr<DrawQuad> Copy( | 36 scoped_ptr<DrawQuad> Copy( |
36 const SharedQuadState* copied_shared_quad_state) const; | 37 const SharedQuadState* copied_shared_quad_state) const; |
37 | 38 |
38 // TODO(danakj): Chromify or remove these SharedQuadState helpers. | 39 // TODO(danakj): Chromify or remove these SharedQuadState helpers. |
39 const gfx::Transform& quadTransform() const { return shared_quad_state->conten
t_to_target_transform; } | 40 const gfx::Transform& quadTransform() const { return shared_quad_state->conten
t_to_target_transform; } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 Material material, | 81 Material material, |
81 gfx::Rect rect, | 82 gfx::Rect rect, |
82 gfx::Rect opaque_rect, | 83 gfx::Rect opaque_rect, |
83 gfx::Rect visible_rect, | 84 gfx::Rect visible_rect, |
84 bool needs_blending); | 85 bool needs_blending); |
85 }; | 86 }; |
86 | 87 |
87 } | 88 } |
88 | 89 |
89 #endif // CC_DRAW_QUAD_H_ | 90 #endif // CC_DRAW_QUAD_H_ |
OLD | NEW |