OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/gles2/gpu_impl.h" | 5 #include "services/ui/gles2/gpu_impl.h" |
6 | 6 |
7 #include "services/ui/common/gpu_type_converters.h" | 7 #include "services/ui/common/gpu_type_converters.h" |
8 #include "services/ui/gles2/command_buffer_impl.h" | 8 #include "services/ui/gles2/command_buffer_impl.h" |
9 | 9 |
| 10 namespace gpu { |
| 11 struct GPUInfo; |
| 12 } |
| 13 |
10 namespace ui { | 14 namespace ui { |
11 | 15 |
12 GpuImpl::GpuImpl(mojo::InterfaceRequest<Gpu> request, | 16 GpuImpl::GpuImpl(mojo::InterfaceRequest<Gpu> request, |
13 const scoped_refptr<GpuState>& state) | 17 const scoped_refptr<GpuState>& state) |
14 : binding_(this, std::move(request)), state_(state) {} | 18 : binding_(this, std::move(request)), state_(state) {} |
15 | 19 |
16 GpuImpl::~GpuImpl() {} | 20 GpuImpl::~GpuImpl() {} |
17 | 21 |
18 void GpuImpl::CreateOffscreenGLES2Context( | 22 void GpuImpl::CreateOffscreenGLES2Context( |
19 mojo::InterfaceRequest<mojom::CommandBuffer> request) { | 23 mojo::InterfaceRequest<mojom::CommandBuffer> request) { |
20 new CommandBufferImpl(std::move(request), state_); | 24 new CommandBufferImpl(std::move(request), state_); |
21 } | 25 } |
22 | 26 |
23 void GpuImpl::GetGpuInfo(const GetGpuInfoCallback& callback) { | 27 void GpuImpl::GetGpuInfo(const GetGpuInfoCallback& callback) { |
24 callback.Run(mojom::GpuInfo::From<gpu::GPUInfo>(state_->gpu_info())); | 28 // callback.Run(mojom::GpuInfo::From<gpu::GPUInfo>(state_->gpu_info())); |
| 29 callback.Run(state_->gpu_info()); |
25 } | 30 } |
26 | 31 |
27 } // namespace ui | 32 } // namespace ui |
OLD | NEW |