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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 PlaneResource(unsigned resource_id, | 104 PlaneResource(unsigned resource_id, |
| 105 const gfx::Size& resource_size, | 105 const gfx::Size& resource_size, |
| 106 ResourceFormat resource_format, | 106 ResourceFormat resource_format, |
| 107 gpu::Mailbox mailbox); | 107 gpu::Mailbox mailbox); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 static bool PlaneResourceMatchesUniqueID(const PlaneResource& plane_resource, | 110 static bool PlaneResourceMatchesUniqueID(const PlaneResource& plane_resource, |
| 111 const media::VideoFrame* video_frame, | 111 const media::VideoFrame* video_frame, |
| 112 size_t plane_index); | 112 size_t plane_index); |
| 113 | 113 |
| 114 static void SetPlaneResourceUniqueId(const media::VideoFrame* video_frame, | 114 static void SetPlaneResourceUniqueId(media::VideoFrame* video_frame, |
|
miu
2016/02/22 21:17:37
Please add a comment like:
// Side effect: Sets
xjz
2016/02/23 03:36:03
Done.
| |
| 115 size_t plane_index, | 115 size_t plane_index, |
| 116 PlaneResource* plane_resource); | 116 PlaneResource* plane_resource); |
| 117 | 117 |
| 118 // This needs to be a container where iterators can be erased without | 118 // This needs to be a container where iterators can be erased without |
| 119 // invalidating other iterators. | 119 // invalidating other iterators. |
| 120 typedef std::list<PlaneResource> ResourceList; | 120 typedef std::list<PlaneResource> ResourceList; |
| 121 ResourceList::iterator AllocateResource(const gfx::Size& plane_size, | 121 ResourceList::iterator AllocateResource(const gfx::Size& plane_size, |
| 122 ResourceFormat format, | 122 ResourceFormat format, |
| 123 bool has_mailbox, | 123 bool has_mailbox, |
| 124 bool immutable_hint); | 124 bool immutable_hint); |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 151 // Recycle resources so that we can reduce the number of allocations and | 151 // Recycle resources so that we can reduce the number of allocations and |
| 152 // data transfers. | 152 // data transfers. |
| 153 ResourceList all_resources_; | 153 ResourceList all_resources_; |
| 154 | 154 |
| 155 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); | 155 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 } // namespace cc | 158 } // namespace cc |
| 159 | 159 |
| 160 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ | 160 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ |
| OLD | NEW |