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 CCYUVVideoDrawQuad_h | 5 #ifndef CCYUVVideoDrawQuad_h |
6 #define CCYUVVideoDrawQuad_h | 6 #define CCYUVVideoDrawQuad_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/draw_quad.h" | 10 #include "cc/draw_quad.h" |
11 #include "cc/video_layer_impl.h" | 11 #include "cc/video_layer_impl.h" |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 | 14 |
15 class YUVVideoDrawQuad : public DrawQuad { | 15 class YUVVideoDrawQuad : public DrawQuad { |
16 public: | 16 public: |
17 static scoped_ptr<YUVVideoDrawQuad> create(const SharedQuadState*, const gfx
::Rect&, const VideoLayerImpl::FramePlane& yPlane, const VideoLayerImpl::FramePl
ane& uPlane, const VideoLayerImpl::FramePlane& vPlane); | 17 static scoped_ptr<YUVVideoDrawQuad> create( |
| 18 const SharedQuadState* sharedQuadState, |
| 19 const gfx::Rect& quadRect, |
| 20 const gfx::SizeF& texScale, |
| 21 const VideoLayerImpl::FramePlane& yPlane, |
| 22 const VideoLayerImpl::FramePlane& uPlane, |
| 23 const VideoLayerImpl::FramePlane& vPlane); |
| 24 |
| 25 const gfx::SizeF& texScale() const { return m_texScale; } |
18 | 26 |
19 const VideoLayerImpl::FramePlane& yPlane() const { return m_yPlane; } | 27 const VideoLayerImpl::FramePlane& yPlane() const { return m_yPlane; } |
20 const VideoLayerImpl::FramePlane& uPlane() const { return m_uPlane; } | 28 const VideoLayerImpl::FramePlane& uPlane() const { return m_uPlane; } |
21 const VideoLayerImpl::FramePlane& vPlane() const { return m_vPlane; } | 29 const VideoLayerImpl::FramePlane& vPlane() const { return m_vPlane; } |
22 | 30 |
23 static const YUVVideoDrawQuad* materialCast(const DrawQuad*); | 31 static const YUVVideoDrawQuad* materialCast(const DrawQuad*); |
24 private: | 32 private: |
25 YUVVideoDrawQuad(const SharedQuadState*, const gfx::Rect&, const VideoLayerI
mpl::FramePlane& yPlane, const VideoLayerImpl::FramePlane& uPlane, const VideoLa
yerImpl::FramePlane& vPlane); | 33 YUVVideoDrawQuad( |
| 34 const SharedQuadState* sharedQuadState, |
| 35 const gfx::Rect& quadRect, |
| 36 const gfx::SizeF& texScale, |
| 37 const VideoLayerImpl::FramePlane& yPlane, |
| 38 const VideoLayerImpl::FramePlane& uPlane, |
| 39 const VideoLayerImpl::FramePlane& vPlane); |
26 | 40 |
| 41 gfx::SizeF m_texScale; |
27 VideoLayerImpl::FramePlane m_yPlane; | 42 VideoLayerImpl::FramePlane m_yPlane; |
28 VideoLayerImpl::FramePlane m_uPlane; | 43 VideoLayerImpl::FramePlane m_uPlane; |
29 VideoLayerImpl::FramePlane m_vPlane; | 44 VideoLayerImpl::FramePlane m_vPlane; |
30 | 45 |
31 DISALLOW_COPY_AND_ASSIGN(YUVVideoDrawQuad); | 46 DISALLOW_COPY_AND_ASSIGN(YUVVideoDrawQuad); |
32 }; | 47 }; |
33 | 48 |
34 } | 49 } |
35 | 50 |
36 #endif | 51 #endif |
OLD | NEW |