| 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 #ifndef CC_YUV_VIDEO_DRAW_QUAD_H_ | 5 #ifndef CC_YUV_VIDEO_DRAW_QUAD_H_ |
| 6 #define CC_YUV_VIDEO_DRAW_QUAD_H_ | 6 #define CC_YUV_VIDEO_DRAW_QUAD_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "cc/cc_export.h" | 10 #include "cc/cc_export.h" |
| 11 #include "cc/draw_quad.h" | 11 #include "cc/draw_quad.h" |
| 12 #include "cc/video_layer_impl.h" | 12 #include "cc/video_layer_impl.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 | 15 |
| 16 class CC_EXPORT YUVVideoDrawQuad : public DrawQuad { | 16 class CC_EXPORT YUVVideoDrawQuad : public DrawQuad { |
| 17 public: | 17 public: |
| 18 static scoped_ptr<YUVVideoDrawQuad> create( | 18 virtual ~YUVVideoDrawQuad(); |
| 19 const SharedQuadState* sharedQuadState, | |
| 20 const gfx::Rect& quadRect, | |
| 21 const gfx::Rect& opaqueRect, | |
| 22 const gfx::SizeF& texScale, | |
| 23 const VideoLayerImpl::FramePlane& yPlane, | |
| 24 const VideoLayerImpl::FramePlane& uPlane, | |
| 25 const VideoLayerImpl::FramePlane& vPlane); | |
| 26 | 19 |
| 27 virtual ~YUVVideoDrawQuad(); | 20 static scoped_ptr<YUVVideoDrawQuad> Create(); |
| 28 | 21 |
| 29 const gfx::SizeF& texScale() const { return m_texScale; } | 22 void SetNew(const SharedQuadState* shared_quad_state, |
| 23 gfx::Rect rect, |
| 24 gfx::Rect opaque_rect, |
| 25 gfx::SizeF tex_scale, |
| 26 const VideoLayerImpl::FramePlane& y_plane, |
| 27 const VideoLayerImpl::FramePlane& u_plane, |
| 28 const VideoLayerImpl::FramePlane& v_plane); |
| 30 | 29 |
| 31 const VideoLayerImpl::FramePlane& yPlane() const { return m_yPlane; } | 30 void SetAll(const SharedQuadState* shared_quad_state, |
| 32 const VideoLayerImpl::FramePlane& uPlane() const { return m_uPlane; } | 31 gfx::Rect rect, |
| 33 const VideoLayerImpl::FramePlane& vPlane() const { return m_vPlane; } | 32 gfx::Rect opaque_rect, |
| 33 gfx::Rect visible_rect, |
| 34 bool needs_blending, |
| 35 gfx::SizeF tex_scale, |
| 36 const VideoLayerImpl::FramePlane& y_plane, |
| 37 const VideoLayerImpl::FramePlane& u_plane, |
| 38 const VideoLayerImpl::FramePlane& v_plane); |
| 34 | 39 |
| 35 static const YUVVideoDrawQuad* materialCast(const DrawQuad*); | 40 gfx::SizeF tex_scale; |
| 36 private: | 41 VideoLayerImpl::FramePlane y_plane; |
| 37 YUVVideoDrawQuad( | 42 VideoLayerImpl::FramePlane u_plane; |
| 38 const SharedQuadState* sharedQuadState, | 43 VideoLayerImpl::FramePlane v_plane; |
| 39 const gfx::Rect& quadRect, | |
| 40 const gfx::Rect& opaqueRect, | |
| 41 const gfx::SizeF& texScale, | |
| 42 const VideoLayerImpl::FramePlane& yPlane, | |
| 43 const VideoLayerImpl::FramePlane& uPlane, | |
| 44 const VideoLayerImpl::FramePlane& vPlane); | |
| 45 | 44 |
| 46 gfx::SizeF m_texScale; | 45 static const YUVVideoDrawQuad* MaterialCast(const DrawQuad*); |
| 47 VideoLayerImpl::FramePlane m_yPlane; | 46 private: |
| 48 VideoLayerImpl::FramePlane m_uPlane; | 47 YUVVideoDrawQuad(); |
| 49 VideoLayerImpl::FramePlane m_vPlane; | |
| 50 }; | 48 }; |
| 51 | 49 |
| 52 } | 50 } |
| 53 | 51 |
| 54 #endif // CC_YUV_VIDEO_DRAW_QUAD_H_ | 52 #endif // CC_YUV_VIDEO_DRAW_QUAD_H_ |
| OLD | NEW |