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 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |