| 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 |
| 11 scoped_ptr<YUVVideoDrawQuad> YUVVideoDrawQuad::create( | 11 scoped_ptr<YUVVideoDrawQuad> YUVVideoDrawQuad::create( |
| 12 const SharedQuadState* sharedQuadState, | 12 const SharedQuadState* sharedQuadState, |
| 13 const gfx::Rect& quadRect, | 13 const gfx::Rect& quadRect, |
| 14 const gfx::Rect& opaqueRect, |
| 14 const gfx::SizeF& texScale, | 15 const gfx::SizeF& texScale, |
| 15 const VideoLayerImpl::FramePlane& yPlane, | 16 const VideoLayerImpl::FramePlane& yPlane, |
| 16 const VideoLayerImpl::FramePlane& uPlane, | 17 const VideoLayerImpl::FramePlane& uPlane, |
| 17 const VideoLayerImpl::FramePlane& vPlane) | 18 const VideoLayerImpl::FramePlane& vPlane) |
| 18 { | 19 { |
| 19 return make_scoped_ptr(new YUVVideoDrawQuad(sharedQuadState, | 20 return make_scoped_ptr(new YUVVideoDrawQuad(sharedQuadState, |
| 20 quadRect, texScale, | 21 quadRect, opaqueRect, texScale, |
| 21 yPlane, uPlane, vPlane)); | 22 yPlane, uPlane, vPlane)); |
| 22 } | 23 } |
| 23 | 24 |
| 24 YUVVideoDrawQuad::YUVVideoDrawQuad( | 25 YUVVideoDrawQuad::YUVVideoDrawQuad( |
| 25 const SharedQuadState* sharedQuadState, | 26 const SharedQuadState* sharedQuadState, |
| 26 const gfx::Rect& quadRect, | 27 const gfx::Rect& quadRect, |
| 28 const gfx::Rect& opaqueRect, |
| 27 const gfx::SizeF& texScale, | 29 const gfx::SizeF& texScale, |
| 28 const VideoLayerImpl::FramePlane& yPlane, | 30 const VideoLayerImpl::FramePlane& yPlane, |
| 29 const VideoLayerImpl::FramePlane& uPlane, | 31 const VideoLayerImpl::FramePlane& uPlane, |
| 30 const VideoLayerImpl::FramePlane& vPlane) | 32 const VideoLayerImpl::FramePlane& vPlane) |
| 31 : DrawQuad(sharedQuadState, DrawQuad::YUV_VIDEO_CONTENT, quadRect) | 33 : DrawQuad(sharedQuadState, DrawQuad::YUV_VIDEO_CONTENT, quadRect, opaqueRec
t) |
| 32 , m_texScale(texScale) | 34 , m_texScale(texScale) |
| 33 , m_yPlane(yPlane) | 35 , m_yPlane(yPlane) |
| 34 , m_uPlane(uPlane) | 36 , m_uPlane(uPlane) |
| 35 , m_vPlane(vPlane) | 37 , m_vPlane(vPlane) |
| 36 { | 38 { |
| 37 } | 39 } |
| 38 | 40 |
| 39 YUVVideoDrawQuad::~YUVVideoDrawQuad() | 41 YUVVideoDrawQuad::~YUVVideoDrawQuad() |
| 40 { | 42 { |
| 41 } | 43 } |
| 42 | 44 |
| 43 const YUVVideoDrawQuad* YUVVideoDrawQuad::materialCast(const DrawQuad* quad) | 45 const YUVVideoDrawQuad* YUVVideoDrawQuad::materialCast(const DrawQuad* quad) |
| 44 { | 46 { |
| 45 DCHECK(quad->material() == DrawQuad::YUV_VIDEO_CONTENT); | 47 DCHECK(quad->material() == DrawQuad::YUV_VIDEO_CONTENT); |
| 46 return static_cast<const YUVVideoDrawQuad*>(quad); | 48 return static_cast<const YUVVideoDrawQuad*>(quad); |
| 47 } | 49 } |
| 48 | 50 |
| 49 } // namespace cc | 51 } // namespace cc |
| OLD | NEW |