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

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.cc

Issue 2583883003: Rebase of Removing gpu::SyncToken usage from video capture pipeline (Closed)
Patch Set: Created 4 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/renderer_host/media/video_capture_controller.h" 5 #include "content/browser/renderer_host/media/video_capture_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 if (client) { 330 if (client) {
331 client->session_closed = true; 331 client->session_closed = true;
332 client->event_handler->OnEnded(client->controller_id); 332 client->event_handler->OnEnded(client->controller_id);
333 } 333 }
334 } 334 }
335 335
336 void VideoCaptureController::ReturnBuffer( 336 void VideoCaptureController::ReturnBuffer(
337 VideoCaptureControllerID id, 337 VideoCaptureControllerID id,
338 VideoCaptureControllerEventHandler* event_handler, 338 VideoCaptureControllerEventHandler* event_handler,
339 int buffer_id, 339 int buffer_id,
340 const gpu::SyncToken& sync_token,
341 double consumer_resource_utilization) { 340 double consumer_resource_utilization) {
342 DCHECK_CURRENTLY_ON(BrowserThread::IO); 341 DCHECK_CURRENTLY_ON(BrowserThread::IO);
343 342
344 ControllerClient* client = FindClient(id, event_handler, controller_clients_); 343 ControllerClient* client = FindClient(id, event_handler, controller_clients_);
345 344
346 // If this buffer is not held by this client, or this client doesn't exist 345 // If this buffer is not held by this client, or this client doesn't exist
347 // in controller, do nothing. 346 // in controller, do nothing.
348 if (!client) { 347 if (!client) {
349 NOTREACHED(); 348 NOTREACHED();
350 return; 349 return;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 int session_id, 525 int session_id,
527 const ControllerClients& clients) { 526 const ControllerClients& clients) {
528 for (const auto& client : clients) { 527 for (const auto& client : clients) {
529 if (client->session_id == session_id) 528 if (client->session_id == session_id)
530 return client.get(); 529 return client.get();
531 } 530 }
532 return nullptr; 531 return nullptr;
533 } 532 }
534 533
535 } // namespace content 534 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698