| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ | 5 #ifndef CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ |
| 6 #define CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ | 6 #define CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 std::vector<ReleaseCallbackImpl> release_callbacks; | 54 std::vector<ReleaseCallbackImpl> release_callbacks; |
| 55 | 55 |
| 56 // TODO(danakj): Remove these too. | 56 // TODO(danakj): Remove these too. |
| 57 std::vector<unsigned> software_resources; | 57 std::vector<unsigned> software_resources; |
| 58 ReleaseCallbackImpl software_release_callback; | 58 ReleaseCallbackImpl software_release_callback; |
| 59 | 59 |
| 60 VideoFrameExternalResources(); | 60 VideoFrameExternalResources(); |
| 61 ~VideoFrameExternalResources(); | 61 ~VideoFrameExternalResources(); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 // VideoResourceUpdater is by the video system to produce frame content as | 64 // VideoResourceUpdater is used by the video system to produce frame content as |
| 65 // resources consumable by the compositor. | 65 // resources consumable by the compositor. |
| 66 class CC_EXPORT VideoResourceUpdater | 66 class CC_EXPORT VideoResourceUpdater |
| 67 : public base::SupportsWeakPtr<VideoResourceUpdater> { | 67 : public base::SupportsWeakPtr<VideoResourceUpdater> { |
| 68 public: | 68 public: |
| 69 explicit VideoResourceUpdater(ContextProvider* context_provider, | 69 VideoResourceUpdater(ContextProvider* context_provider, |
| 70 ResourceProvider* resource_provider); | 70 ResourceProvider* resource_provider); |
| 71 ~VideoResourceUpdater(); | 71 ~VideoResourceUpdater(); |
| 72 | 72 |
| 73 VideoFrameExternalResources CreateExternalResourcesFromVideoFrame( | 73 VideoFrameExternalResources CreateExternalResourcesFromVideoFrame( |
| 74 const scoped_refptr<media::VideoFrame>& video_frame); | 74 const scoped_refptr<media::VideoFrame>& video_frame); |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 struct PlaneResource { | 77 struct PlaneResource { |
| 78 unsigned resource_id; | 78 unsigned resource_id; |
| 79 gfx::Size resource_size; | 79 gfx::Size resource_size; |
| 80 ResourceFormat resource_format; | 80 ResourceFormat resource_format; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // Recycle resources so that we can reduce the number of allocations and | 136 // Recycle resources so that we can reduce the number of allocations and |
| 137 // data transfers. | 137 // data transfers. |
| 138 ResourceList all_resources_; | 138 ResourceList all_resources_; |
| 139 | 139 |
| 140 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); | 140 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 } // namespace cc | 143 } // namespace cc |
| 144 | 144 |
| 145 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ | 145 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ |
| OLD | NEW |