Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: cc/resources/video_resource_updater.h

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mock gpu video accelerator factory Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 void DeleteResource(ResourceList::iterator resource_it); 115 void DeleteResource(ResourceList::iterator resource_it);
116 bool VerifyFrame(const scoped_refptr<media::VideoFrame>& video_frame); 116 bool VerifyFrame(const scoped_refptr<media::VideoFrame>& video_frame);
117 VideoFrameExternalResources CreateForHardwarePlanes( 117 VideoFrameExternalResources CreateForHardwarePlanes(
118 const scoped_refptr<media::VideoFrame>& video_frame); 118 const scoped_refptr<media::VideoFrame>& video_frame);
119 VideoFrameExternalResources CreateForSoftwarePlanes( 119 VideoFrameExternalResources CreateForSoftwarePlanes(
120 const scoped_refptr<media::VideoFrame>& video_frame); 120 const scoped_refptr<media::VideoFrame>& video_frame);
121 121
122 static void RecycleResource(base::WeakPtr<VideoResourceUpdater> updater, 122 static void RecycleResource(base::WeakPtr<VideoResourceUpdater> updater,
123 unsigned resource_id, 123 unsigned resource_id,
124 uint32 sync_point, 124 uint32 sync_point,
125 const gpu::SyncToken& sync_token,
125 bool lost_resource, 126 bool lost_resource,
126 BlockingTaskRunner* main_thread_task_runner); 127 BlockingTaskRunner* main_thread_task_runner);
127 static void ReturnTexture(base::WeakPtr<VideoResourceUpdater> updater, 128 static void ReturnTexture(base::WeakPtr<VideoResourceUpdater> updater,
128 const scoped_refptr<media::VideoFrame>& video_frame, 129 const scoped_refptr<media::VideoFrame>& video_frame,
129 uint32 sync_point, 130 uint32 sync_point,
131 const gpu::SyncToken& sync_token,
130 bool lost_resource, 132 bool lost_resource,
131 BlockingTaskRunner* main_thread_task_runner); 133 BlockingTaskRunner* main_thread_task_runner);
132 134
133 ContextProvider* context_provider_; 135 ContextProvider* context_provider_;
134 ResourceProvider* resource_provider_; 136 ResourceProvider* resource_provider_;
135 scoped_ptr<media::SkCanvasVideoRenderer> video_renderer_; 137 scoped_ptr<media::SkCanvasVideoRenderer> video_renderer_;
136 std::vector<uint8_t> upload_pixels_; 138 std::vector<uint8_t> upload_pixels_;
137 139
138 // Recycle resources so that we can reduce the number of allocations and 140 // Recycle resources so that we can reduce the number of allocations and
139 // data transfers. 141 // data transfers.
140 ResourceList all_resources_; 142 ResourceList all_resources_;
141 143
142 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); 144 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater);
143 }; 145 };
144 146
145 } // namespace cc 147 } // namespace cc
146 148
147 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ 149 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698