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(const SharedQuadState*, const gfx
::Rect&, const VideoLayerImpl::FramePlane& yPlane, const VideoLayerImpl::FramePl
ane& uPlane, const VideoLayerImpl::FramePlane& vPlane); | 18 static scoped_ptr<YUVVideoDrawQuad> create( |
| 19 const SharedQuadState* sharedQuadState, |
| 20 const gfx::Rect& quadRect, |
| 21 const gfx::SizeF& texScale, |
| 22 const VideoLayerImpl::FramePlane& yPlane, |
| 23 const VideoLayerImpl::FramePlane& uPlane, |
| 24 const VideoLayerImpl::FramePlane& vPlane); |
| 25 |
| 26 ~YUVVideoDrawQuad(); |
| 27 |
| 28 const gfx::SizeF& texScale() const { return m_texScale; } |
19 | 29 |
20 const VideoLayerImpl::FramePlane& yPlane() const { return m_yPlane; } | 30 const VideoLayerImpl::FramePlane& yPlane() const { return m_yPlane; } |
21 const VideoLayerImpl::FramePlane& uPlane() const { return m_uPlane; } | 31 const VideoLayerImpl::FramePlane& uPlane() const { return m_uPlane; } |
22 const VideoLayerImpl::FramePlane& vPlane() const { return m_vPlane; } | 32 const VideoLayerImpl::FramePlane& vPlane() const { return m_vPlane; } |
23 | 33 |
24 static const YUVVideoDrawQuad* materialCast(const DrawQuad*); | 34 static const YUVVideoDrawQuad* materialCast(const DrawQuad*); |
25 private: | 35 private: |
26 YUVVideoDrawQuad(const SharedQuadState*, const gfx::Rect&, const VideoLayerI
mpl::FramePlane& yPlane, const VideoLayerImpl::FramePlane& uPlane, const VideoLa
yerImpl::FramePlane& vPlane); | 36 YUVVideoDrawQuad( |
| 37 const SharedQuadState* sharedQuadState, |
| 38 const gfx::Rect& quadRect, |
| 39 const gfx::SizeF& texScale, |
| 40 const VideoLayerImpl::FramePlane& yPlane, |
| 41 const VideoLayerImpl::FramePlane& uPlane, |
| 42 const VideoLayerImpl::FramePlane& vPlane); |
27 | 43 |
| 44 gfx::SizeF m_texScale; |
28 VideoLayerImpl::FramePlane m_yPlane; | 45 VideoLayerImpl::FramePlane m_yPlane; |
29 VideoLayerImpl::FramePlane m_uPlane; | 46 VideoLayerImpl::FramePlane m_uPlane; |
30 VideoLayerImpl::FramePlane m_vPlane; | 47 VideoLayerImpl::FramePlane m_vPlane; |
31 }; | 48 }; |
32 | 49 |
33 } | 50 } |
34 | 51 |
35 #endif // CC_YUV_VIDEO_DRAW_QUAD_H_ | 52 #endif // CC_YUV_VIDEO_DRAW_QUAD_H_ |
OLD | NEW |