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_VIDEO_LAYER_IMPL_H_ | 5 #ifndef CC_VIDEO_LAYER_IMPL_H_ |
6 #define CC_VIDEO_LAYER_IMPL_H_ | 6 #define CC_VIDEO_LAYER_IMPL_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "cc/cc_export.h" | 10 #include "cc/cc_export.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 virtual void didUpdateMatrix(const float*); // Callable on impl thread. | 52 virtual void didUpdateMatrix(const float*); // Callable on impl thread. |
53 | 53 |
54 virtual void didLoseContext() OVERRIDE; | 54 virtual void didLoseContext() OVERRIDE; |
55 | 55 |
56 void setNeedsRedraw(); | 56 void setNeedsRedraw(); |
57 | 57 |
58 struct FramePlane { | 58 struct FramePlane { |
59 ResourceProvider::ResourceId resourceId; | 59 ResourceProvider::ResourceId resourceId; |
60 gfx::Size size; | 60 gfx::Size size; |
61 GLenum format; | 61 GLenum format; |
62 gfx::Size visibleSize; | |
63 | 62 |
64 FramePlane() : resourceId(0) { } | 63 FramePlane() : resourceId(0) { } |
65 | 64 |
66 bool allocateData(ResourceProvider*); | 65 bool allocateData(ResourceProvider*); |
67 void freeData(ResourceProvider*); | 66 void freeData(ResourceProvider*); |
68 }; | 67 }; |
69 | 68 |
70 private: | 69 private: |
71 VideoLayerImpl(int, WebKit::WebVideoFrameProvider*, const FrameUnwrapper&); | 70 VideoLayerImpl(int, WebKit::WebVideoFrameProvider*, const FrameUnwrapper&); |
72 | 71 |
(...skipping 20 matching lines...) Expand all Loading... |
93 ResourceProvider::ResourceId m_externalTextureResource; | 92 ResourceProvider::ResourceId m_externalTextureResource; |
94 scoped_ptr<media::SkCanvasVideoRenderer> m_videoRenderer; | 93 scoped_ptr<media::SkCanvasVideoRenderer> m_videoRenderer; |
95 | 94 |
96 // Each index in this array corresponds to a plane in media::VideoFrame. | 95 // Each index in this array corresponds to a plane in media::VideoFrame. |
97 FramePlane m_framePlanes[media::VideoFrame::kMaxPlanes]; | 96 FramePlane m_framePlanes[media::VideoFrame::kMaxPlanes]; |
98 }; | 97 }; |
99 | 98 |
100 } // namespace cc | 99 } // namespace cc |
101 | 100 |
102 #endif // CC_VIDEO_LAYER_IMPL_H_ | 101 #endif // CC_VIDEO_LAYER_IMPL_H_ |
OLD | NEW |