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 <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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 NOTREACHED(); | 121 NOTREACHED(); |
122 return; | 122 return; |
123 } | 123 } |
124 | 124 |
125 NOTREACHED(); | 125 NOTREACHED(); |
126 } | 126 } |
127 | 127 |
128 GLenum InternalFormat(gfx::BufferFormat format) { | 128 GLenum InternalFormat(gfx::BufferFormat format) { |
129 switch (format) { | 129 switch (format) { |
130 case gfx::BufferFormat::R_8: | 130 case gfx::BufferFormat::R_8: |
131 return GL_R8; | 131 return GL_RED; |
132 case gfx::BufferFormat::RGBA_4444: | 132 case gfx::BufferFormat::RGBA_4444: |
133 case gfx::BufferFormat::RGBA_8888: | 133 case gfx::BufferFormat::RGBA_8888: |
134 return GL_RGBA; | 134 return GL_RGBA; |
135 case gfx::BufferFormat::BGRA_8888: | 135 case gfx::BufferFormat::BGRA_8888: |
136 return GL_BGRA_EXT; | 136 return GL_BGRA_EXT; |
137 case gfx::BufferFormat::ATC: | 137 case gfx::BufferFormat::ATC: |
138 case gfx::BufferFormat::ATCIA: | 138 case gfx::BufferFormat::ATCIA: |
139 case gfx::BufferFormat::BGRX_8888: | 139 case gfx::BufferFormat::BGRX_8888: |
140 case gfx::BufferFormat::DXT1: | 140 case gfx::BufferFormat::DXT1: |
141 case gfx::BufferFormat::DXT5: | 141 case gfx::BufferFormat::DXT5: |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 INSTANTIATE_TEST_CASE_P(GpuMemoryBufferTests, | 239 INSTANTIATE_TEST_CASE_P(GpuMemoryBufferTests, |
240 GpuMemoryBufferTest, | 240 GpuMemoryBufferTest, |
241 ::testing::Values(gfx::BufferFormat::R_8, | 241 ::testing::Values(gfx::BufferFormat::R_8, |
242 gfx::BufferFormat::RGBA_4444, | 242 gfx::BufferFormat::RGBA_4444, |
243 gfx::BufferFormat::RGBA_8888, | 243 gfx::BufferFormat::RGBA_8888, |
244 gfx::BufferFormat::BGRA_8888)); | 244 gfx::BufferFormat::BGRA_8888)); |
245 | 245 |
246 } // namespace gles2 | 246 } // namespace gles2 |
247 } // namespace gpu | 247 } // namespace gpu |
OLD | NEW |