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 12 matching lines...) Expand all Loading... |
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 const gfx::RectF& tex_coord_rect, |
| 33 const gfx::Size& tex_size, |
33 unsigned y_plane_resource_id, | 34 unsigned y_plane_resource_id, |
34 unsigned u_plane_resource_id, | 35 unsigned u_plane_resource_id, |
35 unsigned v_plane_resource_id, | 36 unsigned v_plane_resource_id, |
36 unsigned a_plane_resource_id, | 37 unsigned a_plane_resource_id, |
37 ColorSpace color_space); | 38 ColorSpace color_space); |
38 | 39 |
39 void SetAll(const SharedQuadState* shared_quad_state, | 40 void SetAll(const SharedQuadState* shared_quad_state, |
40 const gfx::Rect& rect, | 41 const gfx::Rect& rect, |
41 const gfx::Rect& opaque_rect, | 42 const gfx::Rect& opaque_rect, |
42 const gfx::Rect& visible_rect, | 43 const gfx::Rect& visible_rect, |
43 bool needs_blending, | 44 bool needs_blending, |
44 const gfx::RectF& tex_coord_rect, | 45 const gfx::RectF& tex_coord_rect, |
| 46 const gfx::Size& tex_size, |
45 unsigned y_plane_resource_id, | 47 unsigned y_plane_resource_id, |
46 unsigned u_plane_resource_id, | 48 unsigned u_plane_resource_id, |
47 unsigned v_plane_resource_id, | 49 unsigned v_plane_resource_id, |
48 unsigned a_plane_resource_id, | 50 unsigned a_plane_resource_id, |
49 ColorSpace color_space); | 51 ColorSpace color_space); |
50 | 52 |
51 gfx::RectF tex_coord_rect; | 53 gfx::RectF tex_coord_rect; |
| 54 // Empty texture size implies no clamping of texture coordinates. |
| 55 gfx::Size tex_size; |
52 unsigned y_plane_resource_id; | 56 unsigned y_plane_resource_id; |
53 unsigned u_plane_resource_id; | 57 unsigned u_plane_resource_id; |
54 unsigned v_plane_resource_id; | 58 unsigned v_plane_resource_id; |
55 unsigned a_plane_resource_id; | 59 unsigned a_plane_resource_id; |
56 ColorSpace color_space; | 60 ColorSpace color_space; |
57 | 61 |
58 void IterateResources(const ResourceIteratorCallback& callback) override; | 62 void IterateResources(const ResourceIteratorCallback& callback) override; |
59 | 63 |
60 static const YUVVideoDrawQuad* MaterialCast(const DrawQuad*); | 64 static const YUVVideoDrawQuad* MaterialCast(const DrawQuad*); |
61 | 65 |
62 private: | 66 private: |
63 void ExtendValue(base::debug::TracedValue* value) const override; | 67 void ExtendValue(base::debug::TracedValue* value) const override; |
64 }; | 68 }; |
65 | 69 |
66 } // namespace cc | 70 } // namespace cc |
67 | 71 |
68 #endif // CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ | 72 #endif // CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ |
OLD | NEW |