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 "mojo/gles2/command_buffer_client_impl.h" | 5 #include "mojo/gles2/command_buffer_client_impl.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 277 |
278 MojoHandle mojo_handle = MOJO_HANDLE_INVALID; | 278 MojoHandle mojo_handle = MOJO_HANDLE_INVALID; |
279 MojoResult create_result = MojoCreatePlatformHandleWrapper( | 279 MojoResult create_result = MojoCreatePlatformHandleWrapper( |
280 platform_handle, &mojo_handle); | 280 platform_handle, &mojo_handle); |
281 if (create_result != MOJO_RESULT_OK) { | 281 if (create_result != MOJO_RESULT_OK) { |
282 NOTIMPLEMENTED(); | 282 NOTIMPLEMENTED(); |
283 return -1; | 283 return -1; |
284 } | 284 } |
285 mojo::ScopedHandle scoped_handle; | 285 mojo::ScopedHandle scoped_handle; |
286 scoped_handle.reset(mojo::Handle(mojo_handle)); | 286 scoped_handle.reset(mojo::Handle(mojo_handle)); |
287 command_buffer_->CreateImage(new_id, | 287 command_buffer_->CreateImage( |
288 scoped_handle.Pass(), | 288 new_id, scoped_handle.Pass(), handle.type, size.Pass(), |
289 handle.type, | 289 static_cast<int32_t>(gpu_memory_buffer->GetFormat()), internalformat); |
290 size.Pass(), | |
291 gpu_memory_buffer->GetFormat(), | |
292 internalformat); | |
293 if (requires_sync_point) { | 290 if (requires_sync_point) { |
294 NOTIMPLEMENTED(); | 291 NOTIMPLEMENTED(); |
295 // TODO(jam): need to support this if we support types other than | 292 // TODO(jam): need to support this if we support types other than |
296 // SHARED_MEMORY_BUFFER. | 293 // SHARED_MEMORY_BUFFER. |
297 //gpu_memory_buffer_manager->SetDestructionSyncPoint(gpu_memory_buffer, | 294 //gpu_memory_buffer_manager->SetDestructionSyncPoint(gpu_memory_buffer, |
298 // InsertSyncPoint()); | 295 // InsertSyncPoint()); |
299 } | 296 } |
300 | 297 |
301 return new_id; | 298 return new_id; |
302 } | 299 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 | 382 |
386 void CommandBufferClientImpl::SetLock(base::Lock* lock) { | 383 void CommandBufferClientImpl::SetLock(base::Lock* lock) { |
387 } | 384 } |
388 | 385 |
389 bool CommandBufferClientImpl::IsGpuChannelLost() { | 386 bool CommandBufferClientImpl::IsGpuChannelLost() { |
390 // This is only possible for out-of-process command buffers. | 387 // This is only possible for out-of-process command buffers. |
391 return false; | 388 return false; |
392 } | 389 } |
393 | 390 |
394 } // namespace gles2 | 391 } // namespace gles2 |
OLD | NEW |