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

Side by Side Diff: gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.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 <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 #include <GLES2/gl2chromium.h> 6 #include <GLES2/gl2chromium.h>
7 #include <GLES2/gl2ext.h> 7 #include <GLES2/gl2ext.h>
8 #include <GLES2/gl2extchromium.h> 8 #include <GLES2/gl2extchromium.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 half_float_buffer[i + 3] = half_float_pixel[3]; 132 half_float_buffer[i + 3] = half_float_pixel[3];
133 } 133 }
134 return; 134 return;
135 } 135 }
136 case gfx::BufferFormat::ATC: 136 case gfx::BufferFormat::ATC:
137 case gfx::BufferFormat::ATCIA: 137 case gfx::BufferFormat::ATCIA:
138 case gfx::BufferFormat::BGRX_8888: 138 case gfx::BufferFormat::BGRX_8888:
139 case gfx::BufferFormat::DXT1: 139 case gfx::BufferFormat::DXT1:
140 case gfx::BufferFormat::DXT5: 140 case gfx::BufferFormat::DXT5:
141 case gfx::BufferFormat::ETC1: 141 case gfx::BufferFormat::ETC1:
142 case gfx::BufferFormat::R_16:
142 case gfx::BufferFormat::RG_88: 143 case gfx::BufferFormat::RG_88:
143 case gfx::BufferFormat::RGBX_8888: 144 case gfx::BufferFormat::RGBX_8888:
144 case gfx::BufferFormat::UYVY_422: 145 case gfx::BufferFormat::UYVY_422:
145 case gfx::BufferFormat::YVU_420: 146 case gfx::BufferFormat::YVU_420:
146 case gfx::BufferFormat::YUV_420_BIPLANAR: 147 case gfx::BufferFormat::YUV_420_BIPLANAR:
147 NOTREACHED(); 148 NOTREACHED();
148 return; 149 return;
149 } 150 }
150 151
151 NOTREACHED(); 152 NOTREACHED();
152 } 153 }
153 154
154 GLenum InternalFormat(gfx::BufferFormat format) { 155 GLenum InternalFormat(gfx::BufferFormat format) {
155 switch (format) { 156 switch (format) {
156 case gfx::BufferFormat::R_8: 157 case gfx::BufferFormat::R_8:
157 return GL_RED; 158 return GL_RED;
159 case gfx::BufferFormat::R_16:
160 return GL_R16_EXT;
158 case gfx::BufferFormat::RG_88: 161 case gfx::BufferFormat::RG_88:
159 return GL_RG; 162 return GL_RG;
160 case gfx::BufferFormat::BGR_565: 163 case gfx::BufferFormat::BGR_565:
161 return GL_RGB; 164 return GL_RGB;
162 case gfx::BufferFormat::RGBA_4444: 165 case gfx::BufferFormat::RGBA_4444:
163 case gfx::BufferFormat::RGBA_8888: 166 case gfx::BufferFormat::RGBA_8888:
164 return GL_RGBA; 167 return GL_RGBA;
165 case gfx::BufferFormat::BGRA_8888: 168 case gfx::BufferFormat::BGRA_8888:
166 return GL_BGRA_EXT; 169 return GL_BGRA_EXT;
167 case gfx::BufferFormat::RGBA_F16: 170 case gfx::BufferFormat::RGBA_F16:
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 GpuMemoryBufferTest, 276 GpuMemoryBufferTest,
274 ::testing::Values(gfx::BufferFormat::R_8, 277 ::testing::Values(gfx::BufferFormat::R_8,
275 gfx::BufferFormat::BGR_565, 278 gfx::BufferFormat::BGR_565,
276 gfx::BufferFormat::RGBA_4444, 279 gfx::BufferFormat::RGBA_4444,
277 gfx::BufferFormat::RGBA_8888, 280 gfx::BufferFormat::RGBA_8888,
278 gfx::BufferFormat::BGRA_8888, 281 gfx::BufferFormat::BGRA_8888,
279 gfx::BufferFormat::RGBA_F16)); 282 gfx::BufferFormat::RGBA_F16));
280 283
281 } // namespace gles2 284 } // namespace gles2
282 } // namespace gpu 285 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gpu_memory_buffer_support.cc ('k') | gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698