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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 {GL_RGBA16I, GL_RGBA_INTEGER, GL_SHORT}, | 224 {GL_RGBA16I, GL_RGBA_INTEGER, GL_SHORT}, |
225 {GL_RGBA32I, GL_RGBA_INTEGER, GL_INT}, | 225 {GL_RGBA32I, GL_RGBA_INTEGER, GL_INT}, |
226 {GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT}, | 226 {GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT}, |
227 {GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT}, | 227 {GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT}, |
228 {GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT}, | 228 {GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT}, |
229 {GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT}, | 229 {GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT}, |
230 {GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT}, | 230 {GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT}, |
231 {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8}, | 231 {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8}, |
232 {GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, | 232 {GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, |
233 GL_FLOAT_32_UNSIGNED_INT_24_8_REV}, | 233 GL_FLOAT_32_UNSIGNED_INT_24_8_REV}, |
| 234 // Exposed by GL_APPLE_texture_format_BGRA8888 |
| 235 {GL_BGRA8_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE}, |
234 }; | 236 }; |
235 | 237 |
236 for (size_t ii = 0; ii < arraysize(kSupportedFormatTypes); ++ii) { | 238 for (size_t ii = 0; ii < arraysize(kSupportedFormatTypes); ++ii) { |
237 supported_combinations_.insert(kSupportedFormatTypes[ii]); | 239 supported_combinations_.insert(kSupportedFormatTypes[ii]); |
238 } | 240 } |
239 } | 241 } |
240 | 242 |
241 // This may be accessed from multiple threads. | 243 // This may be accessed from multiple threads. |
242 bool IsValid(GLenum internal_format, GLenum format, GLenum type) const { | 244 bool IsValid(GLenum internal_format, GLenum format, GLenum type) const { |
243 FormatType query = { internal_format, format, type }; | 245 FormatType query = { internal_format, format, type }; |
(...skipping 3233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3477 uint32_t TextureManager::GetServiceIdGeneration() const { | 3479 uint32_t TextureManager::GetServiceIdGeneration() const { |
3478 return current_service_id_generation_; | 3480 return current_service_id_generation_; |
3479 } | 3481 } |
3480 | 3482 |
3481 void TextureManager::IncrementServiceIdGeneration() { | 3483 void TextureManager::IncrementServiceIdGeneration() { |
3482 current_service_id_generation_++; | 3484 current_service_id_generation_++; |
3483 } | 3485 } |
3484 | 3486 |
3485 } // namespace gles2 | 3487 } // namespace gles2 |
3486 } // namespace gpu | 3488 } // namespace gpu |
OLD | NEW |