OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "gpu/command_buffer/service/in_process_command_buffer.h" | 5 #include "gpu/command_buffer/service/in_process_command_buffer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <queue> | 10 #include <queue> |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 } | 671 } |
672 | 672 |
673 int32_t InProcessCommandBuffer::CreateImage(ClientBuffer buffer, | 673 int32_t InProcessCommandBuffer::CreateImage(ClientBuffer buffer, |
674 size_t width, | 674 size_t width, |
675 size_t height, | 675 size_t height, |
676 unsigned internalformat) { | 676 unsigned internalformat) { |
677 CheckSequencedThread(); | 677 CheckSequencedThread(); |
678 | 678 |
679 DCHECK(gpu_memory_buffer_manager_); | 679 DCHECK(gpu_memory_buffer_manager_); |
680 gfx::GpuMemoryBuffer* gpu_memory_buffer = | 680 gfx::GpuMemoryBuffer* gpu_memory_buffer = |
681 gpu_memory_buffer_manager_->GpuMemoryBufferFromClientBuffer(buffer); | 681 reinterpret_cast<gfx::GpuMemoryBuffer*>(buffer); |
682 DCHECK(gpu_memory_buffer); | 682 DCHECK(gpu_memory_buffer); |
683 | 683 |
684 int32_t new_id = next_image_id_.GetNext(); | 684 int32_t new_id = next_image_id_.GetNext(); |
685 | 685 |
686 DCHECK(gpu::IsGpuMemoryBufferFormatSupported(gpu_memory_buffer->GetFormat(), | 686 DCHECK(gpu::IsGpuMemoryBufferFormatSupported(gpu_memory_buffer->GetFormat(), |
687 capabilities_)); | 687 capabilities_)); |
688 DCHECK(gpu::IsImageFormatCompatibleWithGpuMemoryBufferFormat( | 688 DCHECK(gpu::IsImageFormatCompatibleWithGpuMemoryBufferFormat( |
689 internalformat, gpu_memory_buffer->GetFormat())); | 689 internalformat, gpu_memory_buffer->GetFormat())); |
690 | 690 |
691 // This handle is owned by the GPU thread and must be passed to it or it | 691 // This handle is owned by the GPU thread and must be passed to it or it |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 framebuffer_completeness_cache_ = | 1059 framebuffer_completeness_cache_ = |
1060 new gpu::gles2::FramebufferCompletenessCache; | 1060 new gpu::gles2::FramebufferCompletenessCache; |
1061 return framebuffer_completeness_cache_; | 1061 return framebuffer_completeness_cache_; |
1062 } | 1062 } |
1063 | 1063 |
1064 SyncPointManager* GpuInProcessThread::sync_point_manager() { | 1064 SyncPointManager* GpuInProcessThread::sync_point_manager() { |
1065 return sync_point_manager_; | 1065 return sync_point_manager_; |
1066 } | 1066 } |
1067 | 1067 |
1068 } // namespace gpu | 1068 } // namespace gpu |
OLD | NEW |