Chromium Code Reviews| Index: cc/yuva_video_draw_quad.cc |
| diff --git a/cc/yuva_video_draw_quad.cc b/cc/yuva_video_draw_quad.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..696eb8da02032f6a323998ca0069b759411450ba |
| --- /dev/null |
| +++ b/cc/yuva_video_draw_quad.cc |
| @@ -0,0 +1,62 @@ |
| +// Copyright 2012 The Chromium Authors. All rights reserved. |
|
fgalligan1
2013/02/12 01:20:58
2013
fgalligan1
2013/02/12 01:28:57
nm. Don't change it.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "cc/yuva_video_draw_quad.h" |
| + |
| +#include "base/logging.h" |
| + |
| +namespace cc { |
| + |
| +YUVAVideoDrawQuad::YUVAVideoDrawQuad() {} |
| +YUVAVideoDrawQuad::~YUVAVideoDrawQuad() {} |
| + |
| +scoped_ptr<YUVAVideoDrawQuad> YUVAVideoDrawQuad::Create() { |
| + return make_scoped_ptr(new YUVAVideoDrawQuad); |
| +} |
| + |
| +void YUVAVideoDrawQuad::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; |
|
fgalligan1
2013/02/12 01:20:58
Just call SetAll(shared_quad_state, rect, opaque_r
vigneshv
2013/02/15 18:05:02
Done.
|
| + 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 YUVAVideoDrawQuad::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, |
| + 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; |
| +} |
| + |
| +const YUVAVideoDrawQuad* YUVAVideoDrawQuad::MaterialCast( |
| + const DrawQuad* quad) { |
| + DCHECK(quad->material == DrawQuad::YUVA_VIDEO_CONTENT); |
| + return static_cast<const YUVAVideoDrawQuad*>(quad); |
| +} |
| + |
| +} // namespace cc |