Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Side by Side Diff: gpu/ipc/in_process_command_buffer.cc

Issue 2786103003: Add half-float IOSurface GpuMemoryBuffer support (Closed)
Patch Set: Review feedback Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/ipc/host/gpu_memory_buffer_support.cc ('k') | gpu/ipc/service/gpu_command_buffer_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ipc/in_process_command_buffer.h" 5 #include "gpu/ipc/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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 unsigned internalformat) { 700 unsigned internalformat) {
701 CheckSequencedThread(); 701 CheckSequencedThread();
702 702
703 DCHECK(gpu_memory_buffer_manager_); 703 DCHECK(gpu_memory_buffer_manager_);
704 gfx::GpuMemoryBuffer* gpu_memory_buffer = 704 gfx::GpuMemoryBuffer* gpu_memory_buffer =
705 reinterpret_cast<gfx::GpuMemoryBuffer*>(buffer); 705 reinterpret_cast<gfx::GpuMemoryBuffer*>(buffer);
706 DCHECK(gpu_memory_buffer); 706 DCHECK(gpu_memory_buffer);
707 707
708 int32_t new_id = next_image_id_.GetNext(); 708 int32_t new_id = next_image_id_.GetNext();
709 709
710 DCHECK(gpu::IsGpuMemoryBufferFormatSupported(gpu_memory_buffer->GetFormat(), 710 DCHECK(gpu::IsImageFromGpuMemoryBufferFormatSupported(
711 capabilities_)); 711 gpu_memory_buffer->GetFormat(), capabilities_));
712 DCHECK(gpu::IsImageFormatCompatibleWithGpuMemoryBufferFormat( 712 DCHECK(gpu::IsImageFormatCompatibleWithGpuMemoryBufferFormat(
713 internalformat, gpu_memory_buffer->GetFormat())); 713 internalformat, gpu_memory_buffer->GetFormat()));
714 714
715 // This handle is owned by the GPU thread and must be passed to it or it 715 // This handle is owned by the GPU thread and must be passed to it or it
716 // will leak. In otherwords, do not early out on error between here and the 716 // will leak. In otherwords, do not early out on error between here and the
717 // queuing of the CreateImage task below. 717 // queuing of the CreateImage task below.
718 gfx::GpuMemoryBufferHandle handle = 718 gfx::GpuMemoryBufferHandle handle =
719 gfx::CloneHandleForIPC(gpu_memory_buffer->GetHandle()); 719 gfx::CloneHandleForIPC(gpu_memory_buffer->GetHandle());
720 bool requires_sync_point = handle.type == gfx::IO_SURFACE_BUFFER; 720 bool requires_sync_point = handle.type == gfx::IO_SURFACE_BUFFER;
721 721
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 return wrapped_callback; 1124 return wrapped_callback;
1125 } 1125 }
1126 1126
1127 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback, 1127 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback,
1128 uint32_t order_number) 1128 uint32_t order_number)
1129 : callback(callback), order_number(order_number) {} 1129 : callback(callback), order_number(order_number) {}
1130 1130
1131 InProcessCommandBuffer::GpuTask::~GpuTask() {} 1131 InProcessCommandBuffer::GpuTask::~GpuTask() {}
1132 1132
1133 } // namespace gpu 1133 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/host/gpu_memory_buffer_support.cc ('k') | gpu/ipc/service/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698