| 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 CCVideoLayerImpl_h | 5 #ifndef CCVideoLayerImpl_h |
| 6 #define CCVideoLayerImpl_h | 6 #define CCVideoLayerImpl_h |
| 7 | 7 |
| 8 #include "IntSize.h" | |
| 9 #include "base/callback.h" | 8 #include "base/callback.h" |
| 10 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 11 #include "cc/layer_impl.h" | 10 #include "cc/layer_impl.h" |
| 12 #include "media/base/video_frame.h" | 11 #include "media/base/video_frame.h" |
| 13 #include "third_party/khronos/GLES2/gl2.h" | 12 #include "third_party/khronos/GLES2/gl2.h" |
| 13 #include "ui/gfx/size.h" |
| 14 #include <public/WebTransformationMatrix.h> | 14 #include <public/WebTransformationMatrix.h> |
| 15 #include <public/WebVideoFrameProvider.h> | 15 #include <public/WebVideoFrameProvider.h> |
| 16 | 16 |
| 17 namespace WebKit { | 17 namespace WebKit { |
| 18 class WebVideoFrame; | 18 class WebVideoFrame; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace media { | 21 namespace media { |
| 22 class SkCanvasVideoRenderer; | 22 class SkCanvasVideoRenderer; |
| 23 } | 23 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 49 virtual void stopUsingProvider(); // Callable on any thread. | 49 virtual void stopUsingProvider(); // Callable on any thread. |
| 50 virtual void didReceiveFrame(); // Callable on impl thread. | 50 virtual void didReceiveFrame(); // Callable on impl thread. |
| 51 virtual void didUpdateMatrix(const float*); // Callable on impl thread. | 51 virtual void didUpdateMatrix(const float*); // Callable on impl thread. |
| 52 | 52 |
| 53 virtual void didLoseContext() OVERRIDE; | 53 virtual void didLoseContext() OVERRIDE; |
| 54 | 54 |
| 55 void setNeedsRedraw(); | 55 void setNeedsRedraw(); |
| 56 | 56 |
| 57 struct FramePlane { | 57 struct FramePlane { |
| 58 ResourceProvider::ResourceId resourceId; | 58 ResourceProvider::ResourceId resourceId; |
| 59 IntSize size; | 59 gfx::Size size; |
| 60 GLenum format; | 60 GLenum format; |
| 61 IntSize visibleSize; | 61 gfx::Size visibleSize; |
| 62 | 62 |
| 63 FramePlane() : resourceId(0) { } | 63 FramePlane() : resourceId(0) { } |
| 64 | 64 |
| 65 bool allocateData(ResourceProvider*); | 65 bool allocateData(ResourceProvider*); |
| 66 void freeData(ResourceProvider*); | 66 void freeData(ResourceProvider*); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 VideoLayerImpl(int, WebKit::WebVideoFrameProvider*, const FrameUnwrapper&); | 70 VideoLayerImpl(int, WebKit::WebVideoFrameProvider*, const FrameUnwrapper&); |
| 71 | 71 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 92 ResourceProvider::ResourceId m_externalTextureResource; | 92 ResourceProvider::ResourceId m_externalTextureResource; |
| 93 scoped_ptr<media::SkCanvasVideoRenderer> m_videoRenderer; | 93 scoped_ptr<media::SkCanvasVideoRenderer> m_videoRenderer; |
| 94 | 94 |
| 95 // 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. |
| 96 FramePlane m_framePlanes[media::VideoFrame::kMaxPlanes]; | 96 FramePlane m_framePlanes[media::VideoFrame::kMaxPlanes]; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace cc | 99 } // namespace cc |
| 100 | 100 |
| 101 #endif // CCVideoLayerImpl_h | 101 #endif // CCVideoLayerImpl_h |
| OLD | NEW |