| 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 12 matching lines...) Expand all Loading... |
| 23 } | 23 } |
| 24 | 24 |
| 25 YUVVideoDrawQuad::YUVVideoDrawQuad( | 25 YUVVideoDrawQuad::YUVVideoDrawQuad( |
| 26 const SharedQuadState* sharedQuadState, | 26 const SharedQuadState* sharedQuadState, |
| 27 const gfx::Rect& quadRect, | 27 const gfx::Rect& quadRect, |
| 28 const gfx::Rect& opaqueRect, | 28 const gfx::Rect& opaqueRect, |
| 29 const gfx::SizeF& texScale, | 29 const gfx::SizeF& texScale, |
| 30 const VideoLayerImpl::FramePlane& yPlane, | 30 const VideoLayerImpl::FramePlane& yPlane, |
| 31 const VideoLayerImpl::FramePlane& uPlane, | 31 const VideoLayerImpl::FramePlane& uPlane, |
| 32 const VideoLayerImpl::FramePlane& vPlane) | 32 const VideoLayerImpl::FramePlane& vPlane) |
| 33 : DrawQuad(sharedQuadState, DrawQuad::YUV_VIDEO_CONTENT, quadRect, opaqueRec
t) | 33 : m_texScale(texScale) |
| 34 , m_texScale(texScale) | |
| 35 , m_yPlane(yPlane) | 34 , m_yPlane(yPlane) |
| 36 , m_uPlane(uPlane) | 35 , m_uPlane(uPlane) |
| 37 , m_vPlane(vPlane) | 36 , m_vPlane(vPlane) |
| 38 { | 37 { |
| 38 gfx::Rect visibleRect = quadRect; |
| 39 bool needsBlending = false; |
| 40 DrawQuad::SetAll(sharedQuadState, DrawQuad::YUV_VIDEO_CONTENT, quadRect, opa
queRect, visibleRect, needsBlending); |
| 39 } | 41 } |
| 40 | 42 |
| 41 YUVVideoDrawQuad::~YUVVideoDrawQuad() | 43 YUVVideoDrawQuad::~YUVVideoDrawQuad() |
| 42 { | 44 { |
| 43 } | 45 } |
| 44 | 46 |
| 45 const YUVVideoDrawQuad* YUVVideoDrawQuad::materialCast(const DrawQuad* quad) | 47 const YUVVideoDrawQuad* YUVVideoDrawQuad::materialCast(const DrawQuad* quad) |
| 46 { | 48 { |
| 47 DCHECK(quad->material() == DrawQuad::YUV_VIDEO_CONTENT); | 49 DCHECK(quad->material == DrawQuad::YUV_VIDEO_CONTENT); |
| 48 return static_cast<const YUVVideoDrawQuad*>(quad); | 50 return static_cast<const YUVVideoDrawQuad*>(quad); |
| 49 } | 51 } |
| 50 | 52 |
| 51 } // namespace cc | 53 } // namespace cc |
| OLD | NEW |