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_mus.h" | 5 #include "services/ui/gpu/gpu_service_mus.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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 void GpuServiceMus::InitializeOnGpuThread(IPC::ChannelHandle* channel_handle, | 187 void GpuServiceMus::InitializeOnGpuThread(IPC::ChannelHandle* channel_handle, |
188 base::WaitableEvent* event) { | 188 base::WaitableEvent* event) { |
189 gpu_info_.video_decode_accelerator_capabilities = | 189 gpu_info_.video_decode_accelerator_capabilities = |
190 media::GpuVideoDecodeAccelerator::GetCapabilities(gpu_preferences_); | 190 media::GpuVideoDecodeAccelerator::GetCapabilities(gpu_preferences_); |
191 gpu_info_.video_encode_accelerator_supported_profiles = | 191 gpu_info_.video_encode_accelerator_supported_profiles = |
192 media::GpuVideoEncodeAccelerator::GetSupportedProfiles(gpu_preferences_); | 192 media::GpuVideoEncodeAccelerator::GetSupportedProfiles(gpu_preferences_); |
193 gpu_info_.jpeg_decode_accelerator_supported = | 193 gpu_info_.jpeg_decode_accelerator_supported = |
194 media::GpuJpegDecodeAccelerator::IsSupported(); | 194 media::GpuJpegDecodeAccelerator::IsSupported(); |
195 | 195 |
196 #if defined(USE_OZONE) | 196 #if defined(USE_OZONE) |
| 197 // TODO(rjkroege): Must plumb the shell::Connector* to here and pass into |
| 198 // ozone. |
197 ui::OzonePlatform::InitializeForGPU(); | 199 ui::OzonePlatform::InitializeForGPU(); |
198 #endif | 200 #endif |
199 | 201 |
200 if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER) { | 202 if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER) { |
201 gpu_memory_buffer_factory_ = | 203 gpu_memory_buffer_factory_ = |
202 gpu::GpuMemoryBufferFactory::CreateNativeType(); | 204 gpu::GpuMemoryBufferFactory::CreateNativeType(); |
203 } | 205 } |
204 | 206 |
205 if (!gl::init::InitializeGLOneOff()) | 207 if (!gl::init::InitializeGLOneOff()) |
206 VLOG(1) << "gl::init::InitializeGLOneOff failed"; | 208 VLOG(1) << "gl::init::InitializeGLOneOff failed"; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 return shm; | 266 return shm; |
265 } | 267 } |
266 | 268 |
267 // static | 269 // static |
268 GpuServiceMus* GpuServiceMus::GetInstance() { | 270 GpuServiceMus* GpuServiceMus::GetInstance() { |
269 return base::Singleton<GpuServiceMus, | 271 return base::Singleton<GpuServiceMus, |
270 base::LeakySingletonTraits<GpuServiceMus>>::get(); | 272 base::LeakySingletonTraits<GpuServiceMus>>::get(); |
271 } | 273 } |
272 | 274 |
273 } // namespace ui | 275 } // namespace ui |
OLD | NEW |