| 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_LAYERS_VIDEO_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_VIDEO_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_VIDEO_LAYER_IMPL_H_ | 6 #define CC_LAYERS_VIDEO_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class CC_EXPORT VideoLayerImpl : public LayerImpl { | 24 class CC_EXPORT VideoLayerImpl : public LayerImpl { |
| 25 public: | 25 public: |
| 26 static scoped_ptr<VideoLayerImpl> Create(LayerTreeImpl* tree_impl, | 26 static scoped_ptr<VideoLayerImpl> Create(LayerTreeImpl* tree_impl, |
| 27 int id, | 27 int id, |
| 28 VideoFrameProvider* provider, | 28 VideoFrameProvider* provider, |
| 29 media::VideoRotation video_rotation); | 29 media::VideoRotation video_rotation); |
| 30 virtual ~VideoLayerImpl(); | 30 virtual ~VideoLayerImpl(); |
| 31 | 31 |
| 32 // LayerImpl implementation. | 32 // LayerImpl implementation. |
| 33 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) | 33 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) |
| 34 OVERRIDE; | 34 override; |
| 35 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; | 35 virtual void PushPropertiesTo(LayerImpl* layer) override; |
| 36 virtual bool WillDraw(DrawMode draw_mode, | 36 virtual bool WillDraw(DrawMode draw_mode, |
| 37 ResourceProvider* resource_provider) OVERRIDE; | 37 ResourceProvider* resource_provider) override; |
| 38 virtual void AppendQuads(RenderPass* render_pass, | 38 virtual void AppendQuads(RenderPass* render_pass, |
| 39 const OcclusionTracker<LayerImpl>& occlusion_tracker, | 39 const OcclusionTracker<LayerImpl>& occlusion_tracker, |
| 40 AppendQuadsData* append_quads_data) OVERRIDE; | 40 AppendQuadsData* append_quads_data) override; |
| 41 virtual void DidDraw(ResourceProvider* resource_provider) OVERRIDE; | 41 virtual void DidDraw(ResourceProvider* resource_provider) override; |
| 42 virtual void DidBecomeActive() OVERRIDE; | 42 virtual void DidBecomeActive() override; |
| 43 virtual void ReleaseResources() OVERRIDE; | 43 virtual void ReleaseResources() override; |
| 44 | 44 |
| 45 void SetNeedsRedraw(); | 45 void SetNeedsRedraw(); |
| 46 | 46 |
| 47 void SetProviderClientImpl( | 47 void SetProviderClientImpl( |
| 48 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl); | 48 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl); |
| 49 | 49 |
| 50 media::VideoRotation video_rotation() const { return video_rotation_; } | 50 media::VideoRotation video_rotation() const { return video_rotation_; } |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 VideoLayerImpl(LayerTreeImpl* tree_impl, | 53 VideoLayerImpl(LayerTreeImpl* tree_impl, |
| 54 int id, | 54 int id, |
| 55 media::VideoRotation video_rotation); | 55 media::VideoRotation video_rotation); |
| 56 | 56 |
| 57 virtual const char* LayerTypeAsString() const OVERRIDE; | 57 virtual const char* LayerTypeAsString() const override; |
| 58 | 58 |
| 59 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl_; | 59 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl_; |
| 60 | 60 |
| 61 scoped_refptr<media::VideoFrame> frame_; | 61 scoped_refptr<media::VideoFrame> frame_; |
| 62 | 62 |
| 63 media::VideoRotation video_rotation_; | 63 media::VideoRotation video_rotation_; |
| 64 | 64 |
| 65 scoped_ptr<VideoResourceUpdater> updater_; | 65 scoped_ptr<VideoResourceUpdater> updater_; |
| 66 VideoFrameExternalResources::ResourceType frame_resource_type_; | 66 VideoFrameExternalResources::ResourceType frame_resource_type_; |
| 67 std::vector<ResourceProvider::ResourceId> frame_resources_; | 67 std::vector<ResourceProvider::ResourceId> frame_resources_; |
| 68 | 68 |
| 69 // TODO(danakj): Remove these, hide software path inside ResourceProvider and | 69 // TODO(danakj): Remove these, hide software path inside ResourceProvider and |
| 70 // ExternalResource (aka TextureMailbox) classes. | 70 // ExternalResource (aka TextureMailbox) classes. |
| 71 std::vector<unsigned> software_resources_; | 71 std::vector<unsigned> software_resources_; |
| 72 // Called once for each software resource. | 72 // Called once for each software resource. |
| 73 ReleaseCallbackImpl software_release_callback_; | 73 ReleaseCallbackImpl software_release_callback_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(VideoLayerImpl); | 75 DISALLOW_COPY_AND_ASSIGN(VideoLayerImpl); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace cc | 78 } // namespace cc |
| 79 | 79 |
| 80 #endif // CC_LAYERS_VIDEO_LAYER_IMPL_H_ | 80 #endif // CC_LAYERS_VIDEO_LAYER_IMPL_H_ |
| OLD | NEW |