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

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 638143003: Enabled EXT_sRGB WebGL extension support in the command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added suggested comment Created 6 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This file is here so other GLES2 related files can have a common set of 5 // This file is here so other GLES2 related files can have a common set of
6 // includes where appropriate. 6 // includes where appropriate.
7 7
8 #include <sstream> 8 #include <sstream>
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #include <GLES2/gl2ext.h> 10 #include <GLES2/gl2ext.h>
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 225 case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
226 return 1; 226 return 1;
227 case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 227 case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:
228 return 1; 228 return 1;
229 case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 229 case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:
230 return 1; 230 return 1;
231 // -- glGetFramebufferAttachmentParameteriv with 231 // -- glGetFramebufferAttachmentParameteriv with
232 // GL_EXT_multisampled_render_to_texture 232 // GL_EXT_multisampled_render_to_texture
233 case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT: 233 case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT:
234 return 1; 234 return 1;
235 // -- glGetFramebufferAttachmentParameteriv with
236 // GL_EXT_sRGB
237 case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:
238 return 1;
235 239
236 // -- glGetProgramiv 240 // -- glGetProgramiv
237 case GL_DELETE_STATUS: 241 case GL_DELETE_STATUS:
238 return 1; 242 return 1;
239 case GL_LINK_STATUS: 243 case GL_LINK_STATUS:
240 return 1; 244 return 1;
241 case GL_VALIDATE_STATUS: 245 case GL_VALIDATE_STATUS:
242 return 1; 246 return 1;
243 case GL_INFO_LOG_LENGTH: 247 case GL_INFO_LOG_LENGTH:
244 return 1; 248 return 1;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 case GL_UNSIGNED_SHORT_4_4_4_4: 349 case GL_UNSIGNED_SHORT_4_4_4_4:
346 case GL_UNSIGNED_SHORT_5_5_5_1: 350 case GL_UNSIGNED_SHORT_5_5_5_1:
347 case GL_UNSIGNED_INT_24_8_OES: 351 case GL_UNSIGNED_INT_24_8_OES:
348 return 1; 352 return 1;
349 default: 353 default:
350 break; 354 break;
351 } 355 }
352 356
353 switch (format) { 357 switch (format) {
354 case GL_RGB: 358 case GL_RGB:
359 case GL_SRGB_EXT:
355 return 3; 360 return 3;
356 case GL_LUMINANCE_ALPHA: 361 case GL_LUMINANCE_ALPHA:
357 return 2; 362 return 2;
358 case GL_RGBA: 363 case GL_RGBA:
359 case GL_BGRA_EXT: 364 case GL_BGRA_EXT:
365 case GL_SRGB_ALPHA_EXT:
360 return 4; 366 return 4;
361 case GL_ALPHA: 367 case GL_ALPHA:
362 case GL_LUMINANCE: 368 case GL_LUMINANCE:
363 case GL_DEPTH_COMPONENT: 369 case GL_DEPTH_COMPONENT:
364 case GL_DEPTH_COMPONENT24_OES: 370 case GL_DEPTH_COMPONENT24_OES:
365 case GL_DEPTH_COMPONENT32_OES: 371 case GL_DEPTH_COMPONENT32_OES:
366 case GL_DEPTH_COMPONENT16: 372 case GL_DEPTH_COMPONENT16:
367 case GL_DEPTH24_STENCIL8_OES: 373 case GL_DEPTH24_STENCIL8_OES:
368 case GL_DEPTH_STENCIL_OES: 374 case GL_DEPTH_STENCIL_OES:
369 return 1; 375 return 1;
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 return kAlpha; 669 return kAlpha;
664 case GL_LUMINANCE: 670 case GL_LUMINANCE:
665 return kRGB; 671 return kRGB;
666 case GL_LUMINANCE_ALPHA: 672 case GL_LUMINANCE_ALPHA:
667 return kRGBA; 673 return kRGBA;
668 case GL_RGB: 674 case GL_RGB:
669 case GL_RGB8_OES: 675 case GL_RGB8_OES:
670 case GL_RGB565: 676 case GL_RGB565:
671 case GL_RGB16F_EXT: 677 case GL_RGB16F_EXT:
672 case GL_RGB32F_EXT: 678 case GL_RGB32F_EXT:
679 case GL_SRGB_EXT:
673 return kRGB; 680 return kRGB;
674 case GL_BGRA_EXT: 681 case GL_BGRA_EXT:
675 case GL_BGRA8_EXT: 682 case GL_BGRA8_EXT:
676 case GL_RGBA16F_EXT: 683 case GL_RGBA16F_EXT:
677 case GL_RGBA32F_EXT: 684 case GL_RGBA32F_EXT:
678 case GL_RGBA: 685 case GL_RGBA:
679 case GL_RGBA8_OES: 686 case GL_RGBA8_OES:
680 case GL_RGBA4: 687 case GL_RGBA4:
681 case GL_RGB5_A1: 688 case GL_RGB5_A1:
689 case GL_SRGB_ALPHA_EXT:
690 case GL_SRGB8_ALPHA8_EXT:
682 return kRGBA; 691 return kRGBA;
683 case GL_DEPTH_COMPONENT32_OES: 692 case GL_DEPTH_COMPONENT32_OES:
684 case GL_DEPTH_COMPONENT24_OES: 693 case GL_DEPTH_COMPONENT24_OES:
685 case GL_DEPTH_COMPONENT16: 694 case GL_DEPTH_COMPONENT16:
686 case GL_DEPTH_COMPONENT: 695 case GL_DEPTH_COMPONENT:
687 return kDepth; 696 return kDepth;
688 case GL_STENCIL_INDEX8: 697 case GL_STENCIL_INDEX8:
689 return kStencil; 698 return kStencil;
690 case GL_DEPTH_STENCIL_OES: 699 case GL_DEPTH_STENCIL_OES:
691 case GL_DEPTH24_STENCIL8_OES: 700 case GL_DEPTH24_STENCIL8_OES:
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 } 937 }
929 938
930 return true; 939 return true;
931 } 940 }
932 941
933 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 942 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
934 943
935 } // namespace gles2 944 } // namespace gles2
936 } // namespace gpu 945 } // namespace gpu
937 946
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698