| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 const scoped_refptr<media::VideoFrame>& video_frame); | 73 const scoped_refptr<media::VideoFrame>& video_frame); |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 struct PlaneResource { | 76 struct PlaneResource { |
| 77 unsigned resource_id; | 77 unsigned resource_id; |
| 78 gfx::Size resource_size; | 78 gfx::Size resource_size; |
| 79 ResourceFormat resource_format; | 79 ResourceFormat resource_format; |
| 80 gpu::Mailbox mailbox; | 80 gpu::Mailbox mailbox; |
| 81 | 81 |
| 82 PlaneResource(unsigned resource_id, | 82 PlaneResource(unsigned resource_id, |
| 83 gfx::Size resource_size, | 83 const gfx::Size& resource_size, |
| 84 ResourceFormat resource_format, | 84 ResourceFormat resource_format, |
| 85 gpu::Mailbox mailbox) | 85 gpu::Mailbox mailbox) |
| 86 : resource_id(resource_id), | 86 : resource_id(resource_id), |
| 87 resource_size(resource_size), | 87 resource_size(resource_size), |
| 88 resource_format(resource_format), | 88 resource_format(resource_format), |
| 89 mailbox(mailbox) {} | 89 mailbox(mailbox) {} |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 void DeleteResource(unsigned resource_id); | 92 void DeleteResource(unsigned resource_id); |
| 93 bool VerifyFrame(const scoped_refptr<media::VideoFrame>& video_frame); | 93 bool VerifyFrame(const scoped_refptr<media::VideoFrame>& video_frame); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 113 | 113 |
| 114 std::vector<unsigned> all_resources_; | 114 std::vector<unsigned> all_resources_; |
| 115 std::vector<PlaneResource> recycled_resources_; | 115 std::vector<PlaneResource> recycled_resources_; |
| 116 | 116 |
| 117 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); | 117 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace cc | 120 } // namespace cc |
| 121 | 121 |
| 122 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ | 122 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ |
| OLD | NEW |