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

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

Issue 2735083002: [Mojo Video Capture] Add test coverage for accelerated jpeg decoding (Closed)
Patch Set: Removed OnStoppedUsingGpuDecode() event. Created 3 years, 9 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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 void VideoCaptureController::OnStarted() { 464 void VideoCaptureController::OnStarted() {
465 DCHECK_CURRENTLY_ON(BrowserThread::IO); 465 DCHECK_CURRENTLY_ON(BrowserThread::IO);
466 466
467 for (const auto& client : controller_clients_) { 467 for (const auto& client : controller_clients_) {
468 if (client->session_closed) 468 if (client->session_closed)
469 continue; 469 continue;
470 client->event_handler->OnStarted(client->controller_id); 470 client->event_handler->OnStarted(client->controller_id);
471 } 471 }
472 } 472 }
473 473
474 void VideoCaptureController::OnStartedUsingGpuDecode() {
475 DCHECK_CURRENTLY_ON(BrowserThread::IO);
476 for (const auto& client : controller_clients_) {
477 if (client->session_closed)
478 continue;
479 client->event_handler->OnStartedUsingGpuDecode(client->controller_id);
480 }
481 }
mcasas 2017/03/08 01:33:17 This code looks a lot like l.452-455 and l.467-470
chfremer 2017/03/08 18:58:08 Without saying anything about whether or not it is
482
474 VideoCaptureController::ControllerClient* VideoCaptureController::FindClient( 483 VideoCaptureController::ControllerClient* VideoCaptureController::FindClient(
475 VideoCaptureControllerID id, 484 VideoCaptureControllerID id,
476 VideoCaptureControllerEventHandler* handler, 485 VideoCaptureControllerEventHandler* handler,
477 const ControllerClients& clients) { 486 const ControllerClients& clients) {
478 for (const auto& client : clients) { 487 for (const auto& client : clients) {
479 if (client->controller_id == id && client->event_handler == handler) 488 if (client->controller_id == id && client->event_handler == handler)
480 return client.get(); 489 return client.get();
481 } 490 }
482 return nullptr; 491 return nullptr;
483 } 492 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 if (entry_iter != std::end(client->known_buffer_context_ids)) { 546 if (entry_iter != std::end(client->known_buffer_context_ids)) {
538 client->known_buffer_context_ids.erase(entry_iter); 547 client->known_buffer_context_ids.erase(entry_iter);
539 client->event_handler->OnBufferDestroyed( 548 client->event_handler->OnBufferDestroyed(
540 client->controller_id, buffer_context_iter->buffer_context_id()); 549 client->controller_id, buffer_context_iter->buffer_context_id());
541 } 550 }
542 } 551 }
543 buffer_contexts_.erase(buffer_context_iter); 552 buffer_contexts_.erase(buffer_context_iter);
544 } 553 }
545 554
546 } // namespace content 555 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698