| 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/command_buffer_impl.h" | 5 #include "components/mus/gles2/command_buffer_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "components/mus/common/gpu_type_converters.h" | 10 #include "components/mus/common/gpu_type_converters.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 void CommandBufferImpl::WaitForTokenInRange( | 165 void CommandBufferImpl::WaitForTokenInRange( |
| 166 int32_t start, int32_t end, | 166 int32_t start, int32_t end, |
| 167 const mojom::CommandBuffer::WaitForGetOffsetInRangeCallback& callback) { | 167 const mojom::CommandBuffer::WaitForGetOffsetInRangeCallback& callback) { |
| 168 NOTIMPLEMENTED(); | 168 NOTIMPLEMENTED(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void CommandBufferImpl::BindToRequest( | 171 void CommandBufferImpl::BindToRequest( |
| 172 mojo::InterfaceRequest<mus::mojom::CommandBuffer> request) { | 172 mojo::InterfaceRequest<mus::mojom::CommandBuffer> request) { |
| 173 binding_.reset( | 173 binding_.reset( |
| 174 new mojo::Binding<mus::mojom::CommandBuffer>(this, std::move(request))); | 174 new mojo::Binding<mus::mojom::CommandBuffer>(this, std::move(request))); |
| 175 binding_->set_connection_error_handler([this]() { OnConnectionError(); }); | 175 binding_->set_connection_error_handler( |
| 176 base::Bind(&CommandBufferImpl::OnConnectionError, |
| 177 base::Unretained(this))); |
| 176 } | 178 } |
| 177 | 179 |
| 178 void CommandBufferImpl::InitializeOnGpuThread( | 180 void CommandBufferImpl::InitializeOnGpuThread( |
| 179 mojom::CommandBufferClientPtr client, | 181 mojom::CommandBufferClientPtr client, |
| 180 mojo::ScopedSharedBufferHandle shared_state, | 182 mojo::ScopedSharedBufferHandle shared_state, |
| 181 mojo::Array<int32_t> attribs, | 183 mojo::Array<int32_t> attribs, |
| 182 const base::Callback< | 184 const base::Callback< |
| 183 void(mojom::CommandBufferInitializeResultPtr)>& callback) { | 185 void(mojom::CommandBufferInitializeResultPtr)>& callback) { |
| 184 DCHECK(!driver_); | 186 DCHECK(!driver_); |
| 185 driver_.reset(new CommandBufferDriver( | 187 driver_.reset(new CommandBufferDriver( |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 bool CommandBufferImpl::DeleteOnGpuThread() { | 292 bool CommandBufferImpl::DeleteOnGpuThread() { |
| 291 delete this; | 293 delete this; |
| 292 return true; | 294 return true; |
| 293 } | 295 } |
| 294 | 296 |
| 295 void CommandBufferImpl::DeleteOnGpuThread2() { | 297 void CommandBufferImpl::DeleteOnGpuThread2() { |
| 296 delete this; | 298 delete this; |
| 297 } | 299 } |
| 298 | 300 |
| 299 } // namespace mus | 301 } // namespace mus |
| OLD | NEW |