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

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

Issue 1263043006: Implement the texture uploading of ASTC compression for WebGL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add braces and cleanup. Created 5 years, 3 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" 9 #include "gpu/command_buffer/common/gles2_cmd_format.h"
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
(...skipping 3221 matching lines...) Expand 10 before | Expand all | Expand 10 after
3232 GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG, GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG, 3232 GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG, GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG,
3233 GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}; 3233 GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG};
3234 CheckFormats("GL_IMG_texture_compression_pvrtc", formats, 4); 3234 CheckFormats("GL_IMG_texture_compression_pvrtc", formats, 4);
3235 } 3235 }
3236 3236
3237 TEST_P(GLES2DecoderCompressedFormatsTest, GetCompressedTextureFormatsETC1) { 3237 TEST_P(GLES2DecoderCompressedFormatsTest, GetCompressedTextureFormatsETC1) {
3238 const GLenum formats[] = {GL_ETC1_RGB8_OES}; 3238 const GLenum formats[] = {GL_ETC1_RGB8_OES};
3239 CheckFormats("GL_OES_compressed_ETC1_RGB8_texture", formats, 1); 3239 CheckFormats("GL_OES_compressed_ETC1_RGB8_texture", formats, 1);
3240 } 3240 }
3241 3241
3242 TEST_P(GLES2DecoderCompressedFormatsTest, GetCompressedTextureFormatsASTC) {
3243 const GLenum formats[] = {
3244 GL_COMPRESSED_RGBA_ASTC_4x4_KHR,
3245 GL_COMPRESSED_RGBA_ASTC_5x4_KHR,
3246 GL_COMPRESSED_RGBA_ASTC_5x5_KHR,
3247 GL_COMPRESSED_RGBA_ASTC_6x5_KHR,
3248 GL_COMPRESSED_RGBA_ASTC_6x6_KHR,
3249 GL_COMPRESSED_RGBA_ASTC_8x5_KHR,
3250 GL_COMPRESSED_RGBA_ASTC_8x6_KHR,
3251 GL_COMPRESSED_RGBA_ASTC_8x8_KHR,
3252 GL_COMPRESSED_RGBA_ASTC_10x5_KHR,
3253 GL_COMPRESSED_RGBA_ASTC_10x6_KHR,
3254 GL_COMPRESSED_RGBA_ASTC_10x8_KHR,
3255 GL_COMPRESSED_RGBA_ASTC_10x10_KHR,
3256 GL_COMPRESSED_RGBA_ASTC_12x10_KHR,
3257 GL_COMPRESSED_RGBA_ASTC_12x12_KHR,
3258 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,
3259 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,
3260 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,
3261 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,
3262 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,
3263 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,
3264 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,
3265 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,
3266 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,
3267 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,
3268 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,
3269 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,
3270 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,
3271 GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR};
3272 CheckFormats("GL_KHR_texture_compression_astc_ldr", formats, 28);
3273 }
3274
3242 TEST_P(GLES2DecoderManualInitTest, GetNoCompressedTextureFormats) { 3275 TEST_P(GLES2DecoderManualInitTest, GetNoCompressedTextureFormats) {
3243 InitState init; 3276 InitState init;
3244 init.bind_generates_resource = true; 3277 init.bind_generates_resource = true;
3245 InitDecoder(init); 3278 InitDecoder(init);
3246 3279
3247 EXPECT_CALL(*gl_, GetError()) 3280 EXPECT_CALL(*gl_, GetError())
3248 .WillOnce(Return(GL_NO_ERROR)) 3281 .WillOnce(Return(GL_NO_ERROR))
3249 .WillOnce(Return(GL_NO_ERROR)) 3282 .WillOnce(Return(GL_NO_ERROR))
3250 .WillOnce(Return(GL_NO_ERROR)) 3283 .WillOnce(Return(GL_NO_ERROR))
3251 .WillOnce(Return(GL_NO_ERROR)) 3284 .WillOnce(Return(GL_NO_ERROR))
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
3285 // TODO(gman): CompressedTexSubImage2DImmediate 3318 // TODO(gman): CompressedTexSubImage2DImmediate
3286 3319
3287 // TODO(gman): TexImage2D 3320 // TODO(gman): TexImage2D
3288 3321
3289 // TODO(gman): TexImage2DImmediate 3322 // TODO(gman): TexImage2DImmediate
3290 3323
3291 // TODO(gman): TexSubImage2DImmediate 3324 // TODO(gman): TexSubImage2DImmediate
3292 3325
3293 } // namespace gles2 3326 } // namespace gles2
3294 } // namespace gpu 3327 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698