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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 size->height = static_cast<int32_t>(height); | 265 size->height = static_cast<int32_t>(height); |
266 | 266 |
267 mus::MojoGpuMemoryBufferImpl* gpu_memory_buffer = | 267 mus::MojoGpuMemoryBufferImpl* gpu_memory_buffer = |
268 mus::MojoGpuMemoryBufferImpl::FromClientBuffer(buffer); | 268 mus::MojoGpuMemoryBufferImpl::FromClientBuffer(buffer); |
269 gfx::GpuMemoryBufferHandle handle = gpu_memory_buffer->GetHandle(); | 269 gfx::GpuMemoryBufferHandle handle = gpu_memory_buffer->GetHandle(); |
270 | 270 |
271 bool requires_sync_point = false; | 271 bool requires_sync_point = false; |
272 base::SharedMemoryHandle dupd_handle = | 272 base::SharedMemoryHandle dupd_handle = |
273 base::SharedMemory::DuplicateHandle(handle.handle); | 273 base::SharedMemory::DuplicateHandle(handle.handle); |
274 #if defined(OS_WIN) | 274 #if defined(OS_WIN) |
275 HANDLE platform_handle = dupd_handle; | 275 HANDLE platform_handle = dupd_handle.GetHandle(); |
276 #else | 276 #else |
277 int platform_handle = dupd_handle.fd; | 277 int platform_handle = dupd_handle.fd; |
278 #endif | 278 #endif |
279 | 279 |
280 if (handle.type != gfx::SHARED_MEMORY_BUFFER) { | 280 if (handle.type != gfx::SHARED_MEMORY_BUFFER) { |
281 requires_sync_point = true; | 281 requires_sync_point = true; |
282 NOTIMPLEMENTED(); | 282 NOTIMPLEMENTED(); |
283 return -1; | 283 return -1; |
284 } | 284 } |
285 | 285 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 | 402 |
403 uint64_t CommandBufferClientImpl::GetCommandBufferID() const { | 403 uint64_t CommandBufferClientImpl::GetCommandBufferID() const { |
404 // TODO (rjkroege): This must correspond to the command buffer ID on the | 404 // TODO (rjkroege): This must correspond to the command buffer ID on the |
405 // server side. Most likely a combination of the client-specific integer and | 405 // server side. Most likely a combination of the client-specific integer and |
406 // the connect id. | 406 // the connect id. |
407 NOTIMPLEMENTED(); | 407 NOTIMPLEMENTED(); |
408 return 0; | 408 return 0; |
409 } | 409 } |
410 | 410 |
411 } // namespace gles2 | 411 } // namespace gles2 |
OLD | NEW |