| Index: cc/quads/yuv_video_draw_quad.cc
|
| diff --git a/cc/quads/yuv_video_draw_quad.cc b/cc/quads/yuv_video_draw_quad.cc
|
| index 7876861bd878578bf38d9e91a4d3db3fb4c9f024..7ac1ed7acfb4ae1154a94f6c6b0b6567eee71c45 100644
|
| --- a/cc/quads/yuv_video_draw_quad.cc
|
| +++ b/cc/quads/yuv_video_draw_quad.cc
|
| @@ -24,6 +24,33 @@ void YUVVideoDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
|
| const VideoLayerImpl::FramePlane& v_plane) {
|
| gfx::Rect visible_rect = rect;
|
| bool needs_blending = false;
|
| + SetAll(shared_quad_state, rect, opaque_rect, visible_rect, needs_blending,
|
| + tex_scale, y_plane, u_plane, v_plane, a_plane);
|
| +}
|
| +
|
| +void YUVVideoDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
|
| + gfx::Rect rect,
|
| + gfx::Rect opaque_rect,
|
| + gfx::SizeF tex_scale,
|
| + const VideoLayerImpl::FramePlane& y_plane,
|
| + const VideoLayerImpl::FramePlane& u_plane,
|
| + const VideoLayerImpl::FramePlane& v_plane,
|
| + const VideoLayerImpl::FramePlane& a_plane) {
|
| + gfx::Rect visible_rect = rect;
|
| + bool needs_blending = true;
|
| + SetAll(shared_quad_state, rect, opaque_rect, visible_rect, needs_blending,
|
| + tex_scale, y_plane, u_plane, v_plane, a_plane);
|
| +}
|
| +
|
| +void YUVVideoDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
|
| + gfx::Rect rect,
|
| + gfx::Rect opaque_rect,
|
| + gfx::Rect visible_rect,
|
| + bool needs_blending,
|
| + gfx::SizeF tex_scale,
|
| + const VideoLayerImpl::FramePlane& y_plane,
|
| + const VideoLayerImpl::FramePlane& u_plane,
|
| + const VideoLayerImpl::FramePlane& v_plane) {
|
| DrawQuad::SetAll(shared_quad_state, DrawQuad::YUV_VIDEO_CONTENT, rect,
|
| opaque_rect, visible_rect, needs_blending);
|
| this->tex_scale = tex_scale;
|
| @@ -40,13 +67,15 @@ void YUVVideoDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
|
| gfx::SizeF tex_scale,
|
| const VideoLayerImpl::FramePlane& y_plane,
|
| const VideoLayerImpl::FramePlane& u_plane,
|
| - const VideoLayerImpl::FramePlane& v_plane) {
|
| - DrawQuad::SetAll(shared_quad_state, DrawQuad::YUV_VIDEO_CONTENT, rect,
|
| + const VideoLayerImpl::FramePlane& v_plane,
|
| + const VideoLayerImpl::FramePlane& a_plane) {
|
| + DrawQuad::SetAll(shared_quad_state, DrawQuad::YUVA_VIDEO_CONTENT, rect,
|
| opaque_rect, visible_rect, needs_blending);
|
| this->tex_scale = tex_scale;
|
| this->y_plane = y_plane;
|
| this->u_plane = u_plane;
|
| this->v_plane = v_plane;
|
| + this->a_plane = a_plane;
|
| }
|
|
|
| void YUVVideoDrawQuad::IterateResources(
|
| @@ -54,11 +83,15 @@ void YUVVideoDrawQuad::IterateResources(
|
| y_plane.resource_id = callback.Run(y_plane.resource_id);
|
| u_plane.resource_id = callback.Run(u_plane.resource_id);
|
| v_plane.resource_id = callback.Run(v_plane.resource_id);
|
| + if(a_plane.resource_id) {
|
| + a_plane.resource_id = callback.Run(a_plane.resource_id);
|
| + }
|
| }
|
|
|
| const YUVVideoDrawQuad* YUVVideoDrawQuad::MaterialCast(
|
| const DrawQuad* quad) {
|
| - DCHECK(quad->material == DrawQuad::YUV_VIDEO_CONTENT);
|
| + DCHECK(quad->material == DrawQuad::YUV_VIDEO_CONTENT ||
|
| + quad->material == DrawQuad::YUVA_VIDEO_CONTENT);
|
| return static_cast<const YUVVideoDrawQuad*>(quad);
|
| }
|
|
|
|
|