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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 unsigned resource_id; | 100 unsigned resource_id; |
101 gfx::Size resource_size; | 101 gfx::Size resource_size; |
102 ResourceFormat resource_format; | 102 ResourceFormat resource_format; |
103 gpu::Mailbox mailbox; | 103 gpu::Mailbox mailbox; |
104 }; | 104 }; |
105 static void RecycleResource(base::WeakPtr<VideoResourceUpdater> updater, | 105 static void RecycleResource(base::WeakPtr<VideoResourceUpdater> updater, |
106 RecycleResourceData data, | 106 RecycleResourceData data, |
107 uint32 sync_point, | 107 uint32 sync_point, |
108 bool lost_resource); | 108 bool lost_resource); |
109 | 109 |
| 110 static void ReturnTexture(base::WeakPtr<VideoResourceUpdater> updater, |
| 111 const scoped_refptr<media::VideoFrame>& frame, |
| 112 uint32 sync_point, |
| 113 bool lost_resource); |
| 114 |
110 ContextProvider* context_provider_; | 115 ContextProvider* context_provider_; |
111 ResourceProvider* resource_provider_; | 116 ResourceProvider* resource_provider_; |
112 scoped_ptr<media::SkCanvasVideoRenderer> video_renderer_; | 117 scoped_ptr<media::SkCanvasVideoRenderer> video_renderer_; |
113 | 118 |
114 std::vector<unsigned> all_resources_; | 119 std::vector<unsigned> all_resources_; |
115 std::vector<PlaneResource> recycled_resources_; | 120 std::vector<PlaneResource> recycled_resources_; |
116 | 121 |
117 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); | 122 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); |
118 }; | 123 }; |
119 | 124 |
120 } // namespace cc | 125 } // namespace cc |
121 | 126 |
122 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ | 127 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ |
OLD | NEW |