| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 bool immutable_hint, | 170 bool immutable_hint, |
| 171 int unique_id, | 171 int unique_id, |
| 172 int plane_index); | 172 int plane_index); |
| 173 ResourceList::iterator AllocateResource(const gfx::Size& plane_size, | 173 ResourceList::iterator AllocateResource(const gfx::Size& plane_size, |
| 174 ResourceFormat format, | 174 ResourceFormat format, |
| 175 const gfx::ColorSpace& color_space, | 175 const gfx::ColorSpace& color_space, |
| 176 bool has_mailbox, | 176 bool has_mailbox, |
| 177 bool immutable_hint); | 177 bool immutable_hint); |
| 178 void DeleteResource(ResourceList::iterator resource_it); | 178 void DeleteResource(ResourceList::iterator resource_it); |
| 179 void CopyPlaneTexture(media::VideoFrame* video_frame, | 179 void CopyPlaneTexture(media::VideoFrame* video_frame, |
| 180 const gfx::ColorSpace& resource_color_space, |
| 180 const gpu::MailboxHolder& mailbox_holder, | 181 const gpu::MailboxHolder& mailbox_holder, |
| 181 VideoFrameExternalResources* external_resources); | 182 VideoFrameExternalResources* external_resources); |
| 182 VideoFrameExternalResources CreateForHardwarePlanes( | 183 VideoFrameExternalResources CreateForHardwarePlanes( |
| 183 scoped_refptr<media::VideoFrame> video_frame); | 184 scoped_refptr<media::VideoFrame> video_frame); |
| 184 VideoFrameExternalResources CreateForSoftwarePlanes( | 185 VideoFrameExternalResources CreateForSoftwarePlanes( |
| 185 scoped_refptr<media::VideoFrame> video_frame); | 186 scoped_refptr<media::VideoFrame> video_frame); |
| 186 | 187 |
| 187 static void RecycleResource(base::WeakPtr<VideoResourceUpdater> updater, | 188 static void RecycleResource(base::WeakPtr<VideoResourceUpdater> updater, |
| 188 unsigned resource_id, | 189 unsigned resource_id, |
| 189 const gpu::SyncToken& sync_token, | 190 const gpu::SyncToken& sync_token, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 203 // Recycle resources so that we can reduce the number of allocations and | 204 // Recycle resources so that we can reduce the number of allocations and |
| 204 // data transfers. | 205 // data transfers. |
| 205 ResourceList all_resources_; | 206 ResourceList all_resources_; |
| 206 | 207 |
| 207 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); | 208 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); |
| 208 }; | 209 }; |
| 209 | 210 |
| 210 } // namespace cc | 211 } // namespace cc |
| 211 | 212 |
| 212 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ | 213 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ |
| OLD | NEW |