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

Side by Side Diff: gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc

Issue 1434453008: cc: Fix R_8 GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove GetResourceTextureTarget Created 5 years, 1 month 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 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 NOTREACHED(); 120 NOTREACHED();
121 return; 121 return;
122 } 122 }
123 123
124 NOTREACHED(); 124 NOTREACHED();
125 } 125 }
126 126
127 GLenum InternalFormat(gfx::BufferFormat format) { 127 GLenum InternalFormat(gfx::BufferFormat format) {
128 switch (format) { 128 switch (format) {
129 case gfx::BufferFormat::R_8: 129 case gfx::BufferFormat::R_8:
130 return GL_R8; 130 return GL_RED;
131 case gfx::BufferFormat::RGBA_4444: 131 case gfx::BufferFormat::RGBA_4444:
132 case gfx::BufferFormat::RGBA_8888: 132 case gfx::BufferFormat::RGBA_8888:
133 return GL_RGBA; 133 return GL_RGBA;
134 case gfx::BufferFormat::BGRA_8888: 134 case gfx::BufferFormat::BGRA_8888:
135 return GL_BGRA_EXT; 135 return GL_BGRA_EXT;
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:
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 INSTANTIATE_TEST_CASE_P(GpuMemoryBufferTests, 238 INSTANTIATE_TEST_CASE_P(GpuMemoryBufferTests,
239 GpuMemoryBufferTest, 239 GpuMemoryBufferTest,
240 ::testing::Values(gfx::BufferFormat::R_8, 240 ::testing::Values(gfx::BufferFormat::R_8,
241 gfx::BufferFormat::RGBA_4444, 241 gfx::BufferFormat::RGBA_4444,
242 gfx::BufferFormat::RGBA_8888, 242 gfx::BufferFormat::RGBA_8888,
243 gfx::BufferFormat::BGRA_8888)); 243 gfx::BufferFormat::BGRA_8888));
244 244
245 } // namespace gles2 245 } // namespace gles2
246 } // namespace gpu 246 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/image_factory.cc ('k') | media/video/gpu_memory_buffer_video_frame_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698