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" |
11 #include "cc/layers/video_layer_impl.h" | 11 #include "cc/layers/video_layer_impl.h" |
12 #include "cc/quads/draw_quad.h" | 12 #include "cc/quads/draw_quad.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 | 15 |
16 class CC_EXPORT YUVVideoDrawQuad : public DrawQuad { | 16 class CC_EXPORT YUVVideoDrawQuad : public DrawQuad { |
17 public: | 17 public: |
18 virtual ~YUVVideoDrawQuad(); | 18 virtual ~YUVVideoDrawQuad(); |
19 | 19 |
20 static scoped_ptr<YUVVideoDrawQuad> Create(); | 20 static scoped_ptr<YUVVideoDrawQuad> Create(); |
21 | 21 |
22 void SetNew(const SharedQuadState* shared_quad_state, | 22 void SetNew(const SharedQuadState* shared_quad_state, |
23 const gfx::Rect& rect, | 23 const gfx::Rect& rect, |
24 const gfx::Rect& opaque_rect, | 24 const gfx::Rect& opaque_rect, |
25 const gfx::Rect& visible_rect, | 25 const gfx::Rect& visible_rect, |
26 const gfx::RectF& tex_coord_rect, | 26 const gfx::RectF& tex_coord_rect, |
27 unsigned y_plane_resource_id, | 27 unsigned y_plane_resource_id, |
28 unsigned u_plane_resource_id, | 28 unsigned u_plane_resource_id, |
29 unsigned v_plane_resource_id, | 29 unsigned v_plane_resource_id, |
30 unsigned a_plane_resource_id); | 30 unsigned a_plane_resource_id, |
31 bool has_jpeg_color_range); | |
31 | 32 |
32 void SetAll(const SharedQuadState* shared_quad_state, | 33 void SetAll(const SharedQuadState* shared_quad_state, |
33 const gfx::Rect& rect, | 34 const gfx::Rect& rect, |
34 const gfx::Rect& opaque_rect, | 35 const gfx::Rect& opaque_rect, |
35 const gfx::Rect& visible_rect, | 36 const gfx::Rect& visible_rect, |
36 bool needs_blending, | 37 bool needs_blending, |
37 const gfx::RectF& tex_coord_rect, | 38 const gfx::RectF& tex_coord_rect, |
38 unsigned y_plane_resource_id, | 39 unsigned y_plane_resource_id, |
39 unsigned u_plane_resource_id, | 40 unsigned u_plane_resource_id, |
40 unsigned v_plane_resource_id, | 41 unsigned v_plane_resource_id, |
41 unsigned a_plane_resource_id); | 42 unsigned a_plane_resource_id, |
43 bool has_jpeg_color_range); | |
42 | 44 |
43 gfx::RectF tex_coord_rect; | 45 gfx::RectF tex_coord_rect; |
44 unsigned y_plane_resource_id; | 46 unsigned y_plane_resource_id; |
45 unsigned u_plane_resource_id; | 47 unsigned u_plane_resource_id; |
46 unsigned v_plane_resource_id; | 48 unsigned v_plane_resource_id; |
47 unsigned a_plane_resource_id; | 49 unsigned a_plane_resource_id; |
50 bool has_jpeg_color_range; | |
piman
2014/05/01 21:59:51
It sounds like we could want to support other stan
rileya (GONE FROM CHROMIUM)
2014/05/01 23:25:09
Good point. In fact, there's an outstanding issue
| |
48 | 51 |
49 virtual void IterateResources(const ResourceIteratorCallback& callback) | 52 virtual void IterateResources(const ResourceIteratorCallback& callback) |
50 OVERRIDE; | 53 OVERRIDE; |
51 | 54 |
52 static const YUVVideoDrawQuad* MaterialCast(const DrawQuad*); | 55 static const YUVVideoDrawQuad* MaterialCast(const DrawQuad*); |
53 | 56 |
54 private: | 57 private: |
55 YUVVideoDrawQuad(); | 58 YUVVideoDrawQuad(); |
56 virtual void ExtendValue(base::DictionaryValue* value) const OVERRIDE; | 59 virtual void ExtendValue(base::DictionaryValue* value) const OVERRIDE; |
57 }; | 60 }; |
58 | 61 |
59 } // namespace cc | 62 } // namespace cc |
60 | 63 |
61 #endif // CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ | 64 #endif // CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ |
OLD | NEW |