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

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

Issue 2767063002: 16-bit video upload to float: intermediate R16_EXT and copy to float. (Closed)
Patch Set: Nit. Created 3 years, 8 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 3455 matching lines...) Expand 10 before | Expand all | Expand 10 after
3684 uint32_t TextureManager::GetServiceIdGeneration() const { 3687 uint32_t TextureManager::GetServiceIdGeneration() const {
3685 return current_service_id_generation_; 3688 return current_service_id_generation_;
3686 } 3689 }
3687 3690
3688 void TextureManager::IncrementServiceIdGeneration() { 3691 void TextureManager::IncrementServiceIdGeneration() {
3689 current_service_id_generation_++; 3692 current_service_id_generation_++;
3690 } 3693 }
3691 3694
3692 } // namespace gles2 3695 } // namespace gles2
3693 } // namespace gpu 3696 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698