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

Side by Side Diff: gpu/command_buffer/service/texture_manager.cc

Issue 2117183006: gpu: Clarify sized texture format is available only if ES3 context or immutable texture is supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to ToT Created 4 years, 2 months 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 (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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698