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_YUV_VIDEO_DRAW_QUAD_H_ | 5 #ifndef CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ |
6 #define CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ | 6 #define CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 }; | 22 }; |
23 | 23 |
24 ~YUVVideoDrawQuad() override; | 24 ~YUVVideoDrawQuad() override; |
25 | 25 |
26 YUVVideoDrawQuad(); | 26 YUVVideoDrawQuad(); |
27 | 27 |
28 void SetNew(const SharedQuadState* shared_quad_state, | 28 void SetNew(const SharedQuadState* shared_quad_state, |
29 const gfx::Rect& rect, | 29 const gfx::Rect& rect, |
30 const gfx::Rect& opaque_rect, | 30 const gfx::Rect& opaque_rect, |
31 const gfx::Rect& visible_rect, | 31 const gfx::Rect& visible_rect, |
32 const gfx::RectF& tex_coord_rect, | 32 // |*_tex_coord_rect| contains non-normalized coordinates. |
| 33 // TODO(reveman): Make the use of normalized vs non-normalized |
| 34 // coordinates consistent across all quad types: crbug.com/487370 |
| 35 const gfx::RectF& ya_tex_coord_rect, |
| 36 const gfx::RectF& uv_tex_coord_rect, |
33 const gfx::Size& ya_tex_size, | 37 const gfx::Size& ya_tex_size, |
34 const gfx::Size& uv_tex_size, | 38 const gfx::Size& uv_tex_size, |
35 unsigned y_plane_resource_id, | 39 unsigned y_plane_resource_id, |
36 unsigned u_plane_resource_id, | 40 unsigned u_plane_resource_id, |
37 unsigned v_plane_resource_id, | 41 unsigned v_plane_resource_id, |
38 unsigned a_plane_resource_id, | 42 unsigned a_plane_resource_id, |
39 ColorSpace color_space); | 43 ColorSpace color_space); |
40 | 44 |
41 void SetAll(const SharedQuadState* shared_quad_state, | 45 void SetAll(const SharedQuadState* shared_quad_state, |
42 const gfx::Rect& rect, | 46 const gfx::Rect& rect, |
43 const gfx::Rect& opaque_rect, | 47 const gfx::Rect& opaque_rect, |
44 const gfx::Rect& visible_rect, | 48 const gfx::Rect& visible_rect, |
45 bool needs_blending, | 49 bool needs_blending, |
46 const gfx::RectF& tex_coord_rect, | 50 // |*_tex_coord_rect| contains non-normalized coordinates. |
| 51 // TODO(reveman): Make the use of normalized vs non-normalized |
| 52 // coordinates consistent across all quad types: crbug.com/487370 |
| 53 const gfx::RectF& ya_tex_coord_rect, |
| 54 const gfx::RectF& uv_tex_coord_rect, |
47 const gfx::Size& ya_tex_size, | 55 const gfx::Size& ya_tex_size, |
48 const gfx::Size& uv_tex_size, | 56 const gfx::Size& uv_tex_size, |
49 unsigned y_plane_resource_id, | 57 unsigned y_plane_resource_id, |
50 unsigned u_plane_resource_id, | 58 unsigned u_plane_resource_id, |
51 unsigned v_plane_resource_id, | 59 unsigned v_plane_resource_id, |
52 unsigned a_plane_resource_id, | 60 unsigned a_plane_resource_id, |
53 ColorSpace color_space); | 61 ColorSpace color_space); |
54 | 62 |
55 gfx::RectF tex_coord_rect; | 63 gfx::RectF ya_tex_coord_rect; |
56 // Empty texture size implies no clamping of texture coordinates. | 64 gfx::RectF uv_tex_coord_rect; |
57 gfx::Size ya_tex_size; | 65 gfx::Size ya_tex_size; |
58 gfx::Size uv_tex_size; | 66 gfx::Size uv_tex_size; |
59 unsigned y_plane_resource_id; | 67 unsigned y_plane_resource_id; |
60 unsigned u_plane_resource_id; | 68 unsigned u_plane_resource_id; |
61 unsigned v_plane_resource_id; | 69 unsigned v_plane_resource_id; |
62 unsigned a_plane_resource_id; | 70 unsigned a_plane_resource_id; |
63 ColorSpace color_space; | 71 ColorSpace color_space; |
64 | 72 |
65 void IterateResources(const ResourceIteratorCallback& callback) override; | 73 void IterateResources(const ResourceIteratorCallback& callback) override; |
66 | 74 |
67 static const YUVVideoDrawQuad* MaterialCast(const DrawQuad*); | 75 static const YUVVideoDrawQuad* MaterialCast(const DrawQuad*); |
68 | 76 |
69 private: | 77 private: |
70 void ExtendValue(base::trace_event::TracedValue* value) const override; | 78 void ExtendValue(base::trace_event::TracedValue* value) const override; |
71 }; | 79 }; |
72 | 80 |
73 } // namespace cc | 81 } // namespace cc |
74 | 82 |
75 #endif // CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ | 83 #endif // CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ |
OLD | NEW |