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

Side by Side Diff: gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.cc

Issue 2930143004: Add DIRECT_COMPOSITION GpuMemoryBuffer type.
Patch Set: fix build Created 3 years, 6 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
OLDNEW
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 "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h" 5 #include "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 // static 96 // static
97 bool GpuMemoryBufferImplSharedMemory::IsUsageSupported(gfx::BufferUsage usage) { 97 bool GpuMemoryBufferImplSharedMemory::IsUsageSupported(gfx::BufferUsage usage) {
98 switch (usage) { 98 switch (usage) {
99 case gfx::BufferUsage::GPU_READ: 99 case gfx::BufferUsage::GPU_READ:
100 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE: 100 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE:
101 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT: 101 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT:
102 case gfx::BufferUsage::SCANOUT_CPU_READ_WRITE: 102 case gfx::BufferUsage::SCANOUT_CPU_READ_WRITE:
103 return true; 103 return true;
104 case gfx::BufferUsage::SCANOUT: 104 case gfx::BufferUsage::SCANOUT:
105 case gfx::BufferUsage::SCANOUT_ASYNC:
105 return false; 106 return false;
106 } 107 }
107 NOTREACHED(); 108 NOTREACHED();
108 return false; 109 return false;
109 } 110 }
110 111
111 // static 112 // static
112 bool GpuMemoryBufferImplSharedMemory::IsConfigurationSupported( 113 bool GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
113 gfx::BufferFormat format, 114 gfx::BufferFormat format,
114 gfx::BufferUsage usage) { 115 gfx::BufferUsage usage) {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 return handle; 213 return handle;
213 } 214 }
214 215
215 base::trace_event::MemoryAllocatorDumpGuid 216 base::trace_event::MemoryAllocatorDumpGuid
216 GpuMemoryBufferImplSharedMemory::GetGUIDForTracing( 217 GpuMemoryBufferImplSharedMemory::GetGUIDForTracing(
217 uint64_t tracing_process_id) const { 218 uint64_t tracing_process_id) const {
218 return gfx::GetSharedMemoryGUIDForTracing(tracing_process_id, id_); 219 return gfx::GetSharedMemoryGUIDForTracing(tracing_process_id, id_);
219 } 220 }
220 221
221 } // namespace gpu 222 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698