Chromium Code Reviews| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 BlockingTaskRunner* main_thread_task_runner); | 124 BlockingTaskRunner* main_thread_task_runner); |
| 125 static void ReturnTexture(base::WeakPtr<VideoResourceUpdater> updater, | 125 static void ReturnTexture(base::WeakPtr<VideoResourceUpdater> updater, |
| 126 const scoped_refptr<media::VideoFrame>& video_frame, | 126 const scoped_refptr<media::VideoFrame>& video_frame, |
| 127 uint32 sync_point, | 127 uint32 sync_point, |
| 128 bool lost_resource, | 128 bool lost_resource, |
| 129 BlockingTaskRunner* main_thread_task_runner); | 129 BlockingTaskRunner* main_thread_task_runner); |
| 130 | 130 |
| 131 ContextProvider* context_provider_; | 131 ContextProvider* context_provider_; |
| 132 ResourceProvider* resource_provider_; | 132 ResourceProvider* resource_provider_; |
| 133 scoped_ptr<media::SkCanvasVideoRenderer> video_renderer_; | 133 scoped_ptr<media::SkCanvasVideoRenderer> video_renderer_; |
| 134 // TODO(danakj): Use std::array when we can. | |
|
ericrk
2015/02/19 19:57:41
std::array is compile-time fixed size.
Maybe std:
danakj
2015/02/19 20:46:21
Oh! Hrm. I could just use vector now with some cas
| |
| 135 scoped_ptr<uint8_t[]> upload_pixels_; | |
| 136 size_t upload_pixels_size_; | |
| 134 | 137 |
| 135 // Recycle resources so that we can reduce the number of allocations and | 138 // Recycle resources so that we can reduce the number of allocations and |
| 136 // data transfers. | 139 // data transfers. |
| 137 ResourceList all_resources_; | 140 ResourceList all_resources_; |
| 138 | 141 |
| 139 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); | 142 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); |
| 140 }; | 143 }; |
| 141 | 144 |
| 142 } // namespace cc | 145 } // namespace cc |
| 143 | 146 |
| 144 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ | 147 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ |
| OLD | NEW |