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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 switch (format) { | 122 switch (format) { |
123 case gfx::BufferFormat::ATC: | 123 case gfx::BufferFormat::ATC: |
124 case gfx::BufferFormat::ATCIA: | 124 case gfx::BufferFormat::ATCIA: |
125 case gfx::BufferFormat::DXT1: | 125 case gfx::BufferFormat::DXT1: |
126 case gfx::BufferFormat::DXT5: | 126 case gfx::BufferFormat::DXT5: |
127 case gfx::BufferFormat::ETC1: | 127 case gfx::BufferFormat::ETC1: |
128 // Compressed images must have a width and height that's evenly divisible | 128 // Compressed images must have a width and height that's evenly divisible |
129 // by the block size. | 129 // by the block size. |
130 return size.width() % 4 == 0 && size.height() % 4 == 0; | 130 return size.width() % 4 == 0 && size.height() % 4 == 0; |
131 case gfx::BufferFormat::R_8: | 131 case gfx::BufferFormat::R_8: |
| 132 case gfx::BufferFormat::R_16: |
132 case gfx::BufferFormat::RG_88: | 133 case gfx::BufferFormat::RG_88: |
133 case gfx::BufferFormat::BGR_565: | 134 case gfx::BufferFormat::BGR_565: |
134 case gfx::BufferFormat::RGBA_4444: | 135 case gfx::BufferFormat::RGBA_4444: |
135 case gfx::BufferFormat::RGBA_8888: | 136 case gfx::BufferFormat::RGBA_8888: |
136 case gfx::BufferFormat::RGBX_8888: | 137 case gfx::BufferFormat::RGBX_8888: |
137 case gfx::BufferFormat::BGRA_8888: | 138 case gfx::BufferFormat::BGRA_8888: |
138 case gfx::BufferFormat::BGRX_8888: | 139 case gfx::BufferFormat::BGRX_8888: |
139 case gfx::BufferFormat::RGBA_F16: | 140 case gfx::BufferFormat::RGBA_F16: |
140 return true; | 141 return true; |
141 case gfx::BufferFormat::YVU_420: | 142 case gfx::BufferFormat::YVU_420: |
(...skipping 70 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 |