| 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 "components/mus/gles2/gpu_impl.h" | 5 #include "components/mus/gles2/gpu_impl.h" |
| 6 | 6 |
| 7 #include "components/mus/gles2/command_buffer_driver.h" | 7 #include "components/mus/gles2/command_buffer_driver.h" |
| 8 #include "components/mus/gles2/command_buffer_impl.h" | 8 #include "components/mus/gles2/command_buffer_impl.h" |
| 9 #include "components/mus/gles2/command_buffer_type_conversions.h" | 9 #include "components/mus/gles2/command_buffer_type_conversions.h" |
| 10 | 10 |
| 11 namespace mus { | 11 namespace mus { |
| 12 | 12 |
| 13 GpuImpl::GpuImpl(mojo::InterfaceRequest<Gpu> request, | 13 GpuImpl::GpuImpl(mojo::InterfaceRequest<Gpu> request, |
| 14 const scoped_refptr<GpuState>& state) | 14 const scoped_refptr<GpuState>& state) |
| 15 : binding_(this, request.Pass()), state_(state) { | 15 : binding_(this, request.Pass()), state_(state) { |
| 16 } | 16 } |
| 17 | 17 |
| 18 GpuImpl::~GpuImpl() {} | 18 GpuImpl::~GpuImpl() {} |
| 19 | 19 |
| 20 void GpuImpl::CreateOffscreenGLES2Context( | 20 void GpuImpl::CreateOffscreenGLES2Context( |
| 21 mojo::InterfaceRequest<mojo::CommandBuffer> request) { | 21 mojo::InterfaceRequest<mojom::CommandBuffer> request) { |
| 22 new CommandBufferImpl(request.Pass(), state_, | 22 new CommandBufferImpl(request.Pass(), state_, |
| 23 make_scoped_ptr(new CommandBufferDriver(state_))); | 23 make_scoped_ptr(new CommandBufferDriver(state_))); |
| 24 } | 24 } |
| 25 | 25 |
| 26 void GpuImpl::GetGpuInfo(const GetGpuInfoCallback& callback) { | 26 void GpuImpl::GetGpuInfo(const GetGpuInfoCallback& callback) { |
| 27 callback.Run(mojo::GpuInfo::From<gpu::GPUInfo>(state_->gpu_info())); | 27 callback.Run(mojom::GpuInfo::From<gpu::GPUInfo>(state_->gpu_info())); |
| 28 } | 28 } |
| 29 | 29 |
| 30 } // namespace mus | 30 } // namespace mus |
| OLD | NEW |