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

Side by Side Diff: chrome/gpu/chrome_content_gpu_client.cc

Issue 2919193002: ArcBridge: Rename VideoAcceleratorService to VideoDecodeAccelerator. (Closed)
Patch Set: Address review comments Created 3 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 unified diff | Download patch
« no previous file with comments | « chrome/gpu/chrome_content_gpu_client.h ('k') | chrome/gpu/gpu_arc_video_decode_accelerator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/gpu/chrome_content_gpu_client.h" 5 #include "chrome/gpu/chrome_content_gpu_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/threading/platform_thread.h" 12 #include "base/threading/platform_thread.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "chrome/common/stack_sampling_configuration.h" 14 #include "chrome/common/stack_sampling_configuration.h"
15 #include "components/metrics/child_call_stack_profile_collector.h" 15 #include "components/metrics/child_call_stack_profile_collector.h"
16 #include "content/public/child/child_thread.h" 16 #include "content/public/child/child_thread.h"
17 #include "content/public/common/content_switches.h" 17 #include "content/public/common/content_switches.h"
18 #include "content/public/common/service_names.mojom.h" 18 #include "content/public/common/service_names.mojom.h"
19 #include "mojo/public/cpp/bindings/strong_binding.h" 19 #include "mojo/public/cpp/bindings/strong_binding.h"
20 #include "services/service_manager/public/cpp/connector.h" 20 #include "services/service_manager/public/cpp/connector.h"
21 21
22 #if defined(OS_CHROMEOS) 22 #if defined(OS_CHROMEOS)
23 #include "chrome/gpu/gpu_arc_video_service.h" 23 #include "chrome/gpu/gpu_arc_video_decode_accelerator.h"
24 #include "content/public/common/service_manager_connection.h" 24 #include "content/public/common/service_manager_connection.h"
25 #include "services/service_manager/public/cpp/binder_registry.h" 25 #include "services/service_manager/public/cpp/binder_registry.h"
26 #endif 26 #endif
27 27
28 namespace { 28 namespace {
29 29
30 base::LazyInstance<metrics::ChildCallStackProfileCollector>::Leaky 30 base::LazyInstance<metrics::ChildCallStackProfileCollector>::Leaky
31 g_call_stack_profile_collector = LAZY_INSTANCE_INITIALIZER; 31 g_call_stack_profile_collector = LAZY_INSTANCE_INITIALIZER;
32 32
33 } // namespace 33 } // namespace
(...skipping 24 matching lines...) Expand all
58 // No need for field trial syncer if we're in the browser process. 58 // No need for field trial syncer if we're in the browser process.
59 if (!command_line.HasSwitch(switches::kInProcessGPU)) { 59 if (!command_line.HasSwitch(switches::kInProcessGPU)) {
60 field_trial_syncer_.reset( 60 field_trial_syncer_.reset(
61 new variations::ChildProcessFieldTrialSyncer(observer)); 61 new variations::ChildProcessFieldTrialSyncer(observer));
62 field_trial_syncer_->InitFieldTrialObserving(command_line, 62 field_trial_syncer_->InitFieldTrialObserving(command_line,
63 switches::kSingleProcess); 63 switches::kSingleProcess);
64 } 64 }
65 65
66 #if defined(OS_CHROMEOS) 66 #if defined(OS_CHROMEOS)
67 registry->AddInterface( 67 registry->AddInterface(
68 base::Bind(&ChromeContentGpuClient::CreateArcVideoAcceleratorService, 68 base::Bind(&ChromeContentGpuClient::CreateArcVideoDecodeAccelerator,
69 base::Unretained(this)), 69 base::Unretained(this)),
70 base::ThreadTaskRunnerHandle::Get()); 70 base::ThreadTaskRunnerHandle::Get());
71 #endif 71 #endif
72 } 72 }
73 73
74 void ChromeContentGpuClient::GpuServiceInitialized( 74 void ChromeContentGpuClient::GpuServiceInitialized(
75 const gpu::GpuPreferences& gpu_preferences) { 75 const gpu::GpuPreferences& gpu_preferences) {
76 #if defined(OS_CHROMEOS) 76 #if defined(OS_CHROMEOS)
77 gpu_preferences_ = gpu_preferences; 77 gpu_preferences_ = gpu_preferences;
78 #endif 78 #endif
79 79
80 metrics::mojom::CallStackProfileCollectorPtr browser_interface; 80 metrics::mojom::CallStackProfileCollectorPtr browser_interface;
81 content::ChildThread::Get()->GetConnector()->BindInterface( 81 content::ChildThread::Get()->GetConnector()->BindInterface(
82 content::mojom::kBrowserServiceName, &browser_interface); 82 content::mojom::kBrowserServiceName, &browser_interface);
83 g_call_stack_profile_collector.Get().SetParentProfileCollector( 83 g_call_stack_profile_collector.Get().SetParentProfileCollector(
84 std::move(browser_interface)); 84 std::move(browser_interface));
85 } 85 }
86 86
87 #if defined(OS_CHROMEOS) 87 #if defined(OS_CHROMEOS)
88 88
89 void ChromeContentGpuClient::CreateArcVideoAcceleratorService( 89 void ChromeContentGpuClient::CreateArcVideoDecodeAccelerator(
90 const service_manager::BindSourceInfo& source_info, 90 const service_manager::BindSourceInfo& source_info,
91 ::arc::mojom::VideoAcceleratorServiceRequest request) { 91 ::arc::mojom::VideoDecodeAcceleratorRequest request) {
92 mojo::MakeStrongBinding( 92 mojo::MakeStrongBinding(
93 base::MakeUnique<chromeos::arc::GpuArcVideoService>(gpu_preferences_), 93 base::MakeUnique<chromeos::arc::GpuArcVideoDecodeAccelerator>(
94 gpu_preferences_),
94 std::move(request)); 95 std::move(request));
95 } 96 }
96 97
97 #endif 98 #endif
OLDNEW
« no previous file with comments | « chrome/gpu/chrome_content_gpu_client.h ('k') | chrome/gpu/gpu_arc_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698