| 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 "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  Loading... | 
| 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  Loading... | 
| 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 | 
| OLD | NEW | 
|---|