OLD | NEW |
---|---|
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 #ifndef CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_ | 5 #ifndef CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_ |
6 #define CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_ | 6 #define CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/profiler/stack_sampling_profiler.h" | 11 #include "base/profiler/stack_sampling_profiler.h" |
12 #include "components/variations/child_process_field_trial_syncer.h" | 12 #include "components/variations/child_process_field_trial_syncer.h" |
13 #include "content/public/gpu/content_gpu_client.h" | 13 #include "content/public/gpu/content_gpu_client.h" |
14 | 14 |
15 #if defined(OS_CHROMEOS) | 15 #if defined(OS_CHROMEOS) |
16 #include "chrome/gpu/gpu_arc_video_decode_accelerator.h" | 16 #include "chrome/gpu/gpu_arc_video_decode_accelerator.h" |
kcwu
2017/06/03 10:58:28
why the code is asymmetric for encode and decode?
Owen Lin
2017/06/03 13:54:08
Done.
| |
17 #include "components/arc/common/video_encode_accelerator.mojom.h" | |
17 | 18 |
18 namespace service_manager { | 19 namespace service_manager { |
19 struct BindSourceInfo; | 20 struct BindSourceInfo; |
20 } | 21 } |
21 | 22 |
22 #endif | 23 #endif |
23 | 24 |
24 class ChromeContentGpuClient : public content::ContentGpuClient { | 25 class ChromeContentGpuClient : public content::ContentGpuClient { |
25 public: | 26 public: |
26 ChromeContentGpuClient(); | 27 ChromeContentGpuClient(); |
27 ~ChromeContentGpuClient() override; | 28 ~ChromeContentGpuClient() override; |
28 | 29 |
29 // content::ContentGpuClient: | 30 // content::ContentGpuClient: |
30 void Initialize(base::FieldTrialList::Observer* observer, | 31 void Initialize(base::FieldTrialList::Observer* observer, |
31 service_manager::BinderRegistry* registry) override; | 32 service_manager::BinderRegistry* registry) override; |
32 void GpuServiceInitialized( | 33 void GpuServiceInitialized( |
33 const gpu::GpuPreferences& gpu_preferences) override; | 34 const gpu::GpuPreferences& gpu_preferences) override; |
34 | 35 |
35 private: | 36 private: |
36 #if defined(OS_CHROMEOS) | 37 #if defined(OS_CHROMEOS) |
37 void CreateArcVideoDecodeAccelerator( | 38 void CreateArcVideoDecodeAccelerator( |
38 const service_manager::BindSourceInfo& source_info, | 39 const service_manager::BindSourceInfo& source_info, |
39 ::arc::mojom::VideoDecodeAcceleratorRequest request); | 40 ::arc::mojom::VideoDecodeAcceleratorRequest request); |
41 | |
42 void CreateArcVideoEncodeAccelerator( | |
43 const service_manager::BindSourceInfo& source_info, | |
44 ::arc::mojom::VideoEncodeAcceleratorRequest request); | |
40 #endif | 45 #endif |
41 | 46 |
42 std::unique_ptr<variations::ChildProcessFieldTrialSyncer> field_trial_syncer_; | 47 std::unique_ptr<variations::ChildProcessFieldTrialSyncer> field_trial_syncer_; |
43 // Used to profile process startup. | 48 // Used to profile process startup. |
44 base::StackSamplingProfiler stack_sampling_profiler_; | 49 base::StackSamplingProfiler stack_sampling_profiler_; |
45 | 50 |
46 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
47 gpu::GpuPreferences gpu_preferences_; | 52 gpu::GpuPreferences gpu_preferences_; |
48 #endif | 53 #endif |
49 | 54 |
50 DISALLOW_COPY_AND_ASSIGN(ChromeContentGpuClient); | 55 DISALLOW_COPY_AND_ASSIGN(ChromeContentGpuClient); |
51 }; | 56 }; |
52 | 57 |
53 #endif // CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_ | 58 #endif // CHROME_GPU_CHROME_CONTENT_GPU_CLIENT_H_ |
OLD | NEW |