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

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

Issue 2920793005: gpu: support R16 GPUMemoryBuffer (Closed)
Patch Set: Add bug number to TODO. 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
« no previous file with comments | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | gpu/ipc/host/gpu_memory_buffer_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698