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

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: Rebase. Created 3 years, 11 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 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 if (client) { 371 if (client) {
372 client->session_closed = true; 372 client->session_closed = true;
373 client->event_handler->OnEnded(client->controller_id); 373 client->event_handler->OnEnded(client->controller_id);
374 } 374 }
375 } 375 }
376 376
377 void VideoCaptureController::ReturnBuffer( 377 void VideoCaptureController::ReturnBuffer(
378 VideoCaptureControllerID id, 378 VideoCaptureControllerID id,
379 VideoCaptureControllerEventHandler* event_handler, 379 VideoCaptureControllerEventHandler* event_handler,
380 int buffer_id, 380 int buffer_id,
381 const gpu::SyncToken& sync_token,
382 double consumer_resource_utilization) { 381 double consumer_resource_utilization) {
383 DCHECK_CURRENTLY_ON(BrowserThread::IO); 382 DCHECK_CURRENTLY_ON(BrowserThread::IO);
384 383
385 ControllerClient* client = FindClient(id, event_handler, controller_clients_); 384 ControllerClient* client = FindClient(id, event_handler, controller_clients_);
386 385
387 // If this buffer is not held by this client, or this client doesn't exist 386 // If this buffer is not held by this client, or this client doesn't exist
388 // in controller, do nothing. 387 // in controller, do nothing.
389 if (!client) { 388 if (!client) {
390 NOTREACHED(); 389 NOTREACHED();
391 return; 390 return;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 int session_id, 566 int session_id,
568 const ControllerClients& clients) { 567 const ControllerClients& clients) {
569 for (const auto& client : clients) { 568 for (const auto& client : clients) {
570 if (client->session_id == session_id) 569 if (client->session_id == session_id)
571 return client.get(); 570 return client.get();
572 } 571 }
573 return nullptr; 572 return nullptr;
574 } 573 }
575 574
576 } // namespace content 575 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698