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 #include "cc/yuv_video_draw_quad.h" | 5 #include "cc/yuv_video_draw_quad.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 const VideoLayerImpl::FramePlane& u_plane, | 42 const VideoLayerImpl::FramePlane& u_plane, |
43 const VideoLayerImpl::FramePlane& v_plane) { | 43 const VideoLayerImpl::FramePlane& v_plane) { |
44 DrawQuad::SetAll(shared_quad_state, DrawQuad::YUV_VIDEO_CONTENT, rect, | 44 DrawQuad::SetAll(shared_quad_state, DrawQuad::YUV_VIDEO_CONTENT, rect, |
45 opaque_rect, visible_rect, needs_blending); | 45 opaque_rect, visible_rect, needs_blending); |
46 this->tex_scale = tex_scale; | 46 this->tex_scale = tex_scale; |
47 this->y_plane = y_plane; | 47 this->y_plane = y_plane; |
48 this->u_plane = u_plane; | 48 this->u_plane = u_plane; |
49 this->v_plane = v_plane; | 49 this->v_plane = v_plane; |
50 } | 50 } |
51 | 51 |
| 52 void YUVVideoDrawQuad::AppendResources( |
| 53 ResourceProvider::ResourceIdArray* resources) { |
| 54 resources->push_back(y_plane.resourceId); |
| 55 resources->push_back(u_plane.resourceId); |
| 56 resources->push_back(v_plane.resourceId); |
| 57 } |
| 58 |
52 const YUVVideoDrawQuad* YUVVideoDrawQuad::MaterialCast( | 59 const YUVVideoDrawQuad* YUVVideoDrawQuad::MaterialCast( |
53 const DrawQuad* quad) { | 60 const DrawQuad* quad) { |
54 DCHECK(quad->material == DrawQuad::YUV_VIDEO_CONTENT); | 61 DCHECK(quad->material == DrawQuad::YUV_VIDEO_CONTENT); |
55 return static_cast<const YUVVideoDrawQuad*>(quad); | 62 return static_cast<const YUVVideoDrawQuad*>(quad); |
56 } | 63 } |
57 | 64 |
58 } // namespace cc | 65 } // namespace cc |
OLD | NEW |