OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/command_buffer/service/texture_manager.h" | 5 #include "gpu/command_buffer/service/texture_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 GL_FLOAT_32_UNSIGNED_INT_24_8_REV}, | 209 GL_FLOAT_32_UNSIGNED_INT_24_8_REV}, |
210 | 210 |
211 // Exposed by GL_APPLE_texture_format_BGRA8888 for TexStorage* | 211 // Exposed by GL_APPLE_texture_format_BGRA8888 for TexStorage* |
212 // TODO(kainino): this actually exposes it for (Copy)TexImage* as well, | 212 // TODO(kainino): this actually exposes it for (Copy)TexImage* as well, |
213 // which is incorrect. crbug.com/663086 | 213 // which is incorrect. crbug.com/663086 |
214 {GL_BGRA8_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE}, | 214 {GL_BGRA8_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE}, |
215 | 215 |
216 // Exposed by GL_APPLE_texture_format_BGRA8888 and | 216 // Exposed by GL_APPLE_texture_format_BGRA8888 and |
217 // GL_EXT_texture_format_BGRA8888 | 217 // GL_EXT_texture_format_BGRA8888 |
218 {GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE}, | 218 {GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE}, |
| 219 |
| 220 // Exposed by GL_EXT_texture_norm16 |
| 221 {GL_R16_EXT, GL_RED, GL_UNSIGNED_SHORT}, |
219 }; | 222 }; |
220 | 223 |
221 static const FormatType kSupportedFormatTypesES2Only[] = { | 224 static const FormatType kSupportedFormatTypesES2Only[] = { |
222 // Exposed by GL_OES_texture_float and GL_OES_texture_half_float | 225 // Exposed by GL_OES_texture_float and GL_OES_texture_half_float |
223 {GL_RGB, GL_RGB, GL_FLOAT}, | 226 {GL_RGB, GL_RGB, GL_FLOAT}, |
224 {GL_RGBA, GL_RGBA, GL_FLOAT}, | 227 {GL_RGBA, GL_RGBA, GL_FLOAT}, |
225 {GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, GL_FLOAT}, | 228 {GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, GL_FLOAT}, |
226 {GL_LUMINANCE, GL_LUMINANCE, GL_FLOAT}, | 229 {GL_LUMINANCE, GL_LUMINANCE, GL_FLOAT}, |
227 {GL_ALPHA, GL_ALPHA, GL_FLOAT}, | 230 {GL_ALPHA, GL_ALPHA, GL_FLOAT}, |
228 {GL_RGB, GL_RGB, GL_HALF_FLOAT_OES}, | 231 {GL_RGB, GL_RGB, GL_HALF_FLOAT_OES}, |
(...skipping 3427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3656 uint32_t TextureManager::GetServiceIdGeneration() const { | 3659 uint32_t TextureManager::GetServiceIdGeneration() const { |
3657 return current_service_id_generation_; | 3660 return current_service_id_generation_; |
3658 } | 3661 } |
3659 | 3662 |
3660 void TextureManager::IncrementServiceIdGeneration() { | 3663 void TextureManager::IncrementServiceIdGeneration() { |
3661 current_service_id_generation_++; | 3664 current_service_id_generation_++; |
3662 } | 3665 } |
3663 | 3666 |
3664 } // namespace gles2 | 3667 } // namespace gles2 |
3665 } // namespace gpu | 3668 } // namespace gpu |
OLD | NEW |