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

Unified Diff: content/browser/media/capture/desktop_capture_device_aura.cc

Issue 312803002: Android media: VideoFrame should not store so many sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make VideoFrame keep only one sync point per client Created 6 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/media/capture/desktop_capture_device_aura.cc
diff --git a/content/browser/media/capture/desktop_capture_device_aura.cc b/content/browser/media/capture/desktop_capture_device_aura.cc
index 432a1854019aab49d9876a3fe646b0bb31fe9ff5..8a5ead9a5c0fc1680fb3a010742b55ea3b7573d4 100644
--- a/content/browser/media/capture/desktop_capture_device_aura.cc
+++ b/content/browser/media/capture/desktop_capture_device_aura.cc
@@ -305,12 +305,15 @@ void CopyOutputFinishedForVideo(
}
void RunSingleReleaseCallback(scoped_ptr<cc::SingleReleaseCallback> cb,
- const std::vector<uint32>& sync_points) {
+ const std::map<uintptr_t, uint32>& sync_points) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
GLHelper* gl_helper = ImageTransportFactory::GetInstance()->GetGLHelper();
DCHECK(gl_helper);
- for (unsigned i = 0; i < sync_points.size(); i++)
- gl_helper->WaitSyncPoint(sync_points[i]);
+ for (std::map<uintptr_t, uint32>::const_iterator iter = sync_points.begin();
+ iter != sync_points.end();
+ iter++) {
+ gl_helper->WaitSyncPoint(iter->second);
+ }
uint32 new_sync_point = gl_helper->InsertSyncPoint();
cb->Run(new_sync_point, false);
}

Powered by Google App Engine
This is Rietveld 408576698