| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_LAYERS_VIDEO_LAYER_H_ | 5 #ifndef CC_LAYERS_VIDEO_LAYER_H_ |
| 6 #define CC_LAYERS_VIDEO_LAYER_H_ | 6 #define CC_LAYERS_VIDEO_LAYER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| 11 #include "cc/layers/layer.h" | 11 #include "cc/layers/layer.h" |
| 12 #include "cc/layers/layer_settings.h" | |
| 13 #include "media/base/video_rotation.h" | 12 #include "media/base/video_rotation.h" |
| 14 | 13 |
| 15 namespace media { class VideoFrame; } | 14 namespace media { class VideoFrame; } |
| 16 | 15 |
| 17 namespace cc { | 16 namespace cc { |
| 18 | 17 |
| 19 class VideoFrameProvider; | 18 class VideoFrameProvider; |
| 20 class VideoLayerImpl; | 19 class VideoLayerImpl; |
| 21 | 20 |
| 22 // A Layer that contains a Video element. | 21 // A Layer that contains a Video element. |
| 23 class CC_EXPORT VideoLayer : public Layer { | 22 class CC_EXPORT VideoLayer : public Layer { |
| 24 public: | 23 public: |
| 25 static scoped_refptr<VideoLayer> Create(const LayerSettings& settings, | 24 static scoped_refptr<VideoLayer> Create(VideoFrameProvider* provider, |
| 26 VideoFrameProvider* provider, | |
| 27 media::VideoRotation video_rotation); | 25 media::VideoRotation video_rotation); |
| 28 | 26 |
| 29 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 27 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
| 30 | 28 |
| 31 bool Update() override; | 29 bool Update() override; |
| 32 | 30 |
| 33 private: | 31 private: |
| 34 VideoLayer(const LayerSettings& settings, | 32 VideoLayer(VideoFrameProvider* provider, media::VideoRotation video_rotation); |
| 35 VideoFrameProvider* provider, | |
| 36 media::VideoRotation video_rotation); | |
| 37 ~VideoLayer() override; | 33 ~VideoLayer() override; |
| 38 | 34 |
| 39 // This pointer is only for passing to VideoLayerImpl's constructor. It should | 35 // This pointer is only for passing to VideoLayerImpl's constructor. It should |
| 40 // never be dereferenced by this class. | 36 // never be dereferenced by this class. |
| 41 VideoFrameProvider* provider_; | 37 VideoFrameProvider* provider_; |
| 42 | 38 |
| 43 media::VideoRotation video_rotation_; | 39 media::VideoRotation video_rotation_; |
| 44 | 40 |
| 45 DISALLOW_COPY_AND_ASSIGN(VideoLayer); | 41 DISALLOW_COPY_AND_ASSIGN(VideoLayer); |
| 46 }; | 42 }; |
| 47 | 43 |
| 48 } // namespace cc | 44 } // namespace cc |
| 49 | 45 |
| 50 #endif // CC_LAYERS_VIDEO_LAYER_H_ | 46 #endif // CC_LAYERS_VIDEO_LAYER_H_ |
| OLD | NEW |