Chromium Code Reviews| 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 #include "services/ui/gpu/gpu_service_internal.h" | 5 #include "services/ui/gpu/gpu_service_internal.h" |
| 6 | 6 |
| 7 #include "base/memory/shared_memory.h" | 7 #include "base/memory/shared_memory.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 gpu_info_.video_decode_accelerator_capabilities = | 155 gpu_info_.video_decode_accelerator_capabilities = |
| 156 media::GpuVideoDecodeAccelerator::GetCapabilities(gpu_preferences_); | 156 media::GpuVideoDecodeAccelerator::GetCapabilities(gpu_preferences_); |
| 157 gpu_info_.video_encode_accelerator_supported_profiles = | 157 gpu_info_.video_encode_accelerator_supported_profiles = |
| 158 media::GpuVideoEncodeAccelerator::GetSupportedProfiles(gpu_preferences_); | 158 media::GpuVideoEncodeAccelerator::GetSupportedProfiles(gpu_preferences_); |
| 159 gpu_info_.jpeg_decode_accelerator_supported = | 159 gpu_info_.jpeg_decode_accelerator_supported = |
| 160 media::GpuJpegDecodeAccelerator::IsSupported(); | 160 media::GpuJpegDecodeAccelerator::IsSupported(); |
| 161 | 161 |
| 162 #if defined(USE_OZONE) | 162 #if defined(USE_OZONE) |
| 163 // TODO(rjkroege): Must plumb the shell::Connector* to here and pass into | 163 // TODO(rjkroege): Must plumb the shell::Connector* to here and pass into |
| 164 // ozone. | 164 // ozone. |
| 165 ui::OzonePlatform::InitializeForGPU(); | 165 ui::OzonePlatform::InitParams params; |
| 166 params.single_process = false; | |
|
rjkroege
2016/09/12 20:39:12
This will break downstream code. Please don't do
fwang
2016/09/13 13:49:19
I'm not sure I understand this... Can you elaborat
| |
| 167 ui::OzonePlatform::InitializeForGPU(params); | |
| 166 #endif | 168 #endif |
| 167 | 169 |
| 168 if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER) { | 170 if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER) { |
| 169 gpu_memory_buffer_factory_ = | 171 gpu_memory_buffer_factory_ = |
| 170 gpu::GpuMemoryBufferFactory::CreateNativeType(); | 172 gpu::GpuMemoryBufferFactory::CreateNativeType(); |
| 171 } | 173 } |
| 172 | 174 |
| 173 if (!gl::init::InitializeGLOneOff()) | 175 if (!gl::init::InitializeGLOneOff()) |
| 174 VLOG(1) << "gl::init::InitializeGLOneOff failed"; | 176 VLOG(1) << "gl::init::InitializeGLOneOff failed"; |
| 175 | 177 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 allow_real_time_streams, callback); | 249 allow_real_time_streams, callback); |
| 248 } | 250 } |
| 249 | 251 |
| 250 // static | 252 // static |
| 251 GpuServiceInternal* GpuServiceInternal::GetInstance() { | 253 GpuServiceInternal* GpuServiceInternal::GetInstance() { |
| 252 return base::Singleton<GpuServiceInternal, | 254 return base::Singleton<GpuServiceInternal, |
| 253 base::LeakySingletonTraits<GpuServiceInternal>>::get(); | 255 base::LeakySingletonTraits<GpuServiceInternal>>::get(); |
| 254 } | 256 } |
| 255 | 257 |
| 256 } // namespace ui | 258 } // namespace ui |
| OLD | NEW |