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

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

Issue 7458008: Support GL_OES_EGL_image_external (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix typo which hung the windows gpu_unittests by corrupting the stack Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <stdio.h> 8 #include <stdio.h>
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #include <GLES2/gl2ext.h> 10 #include <GLES2/gl2ext.h>
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 case GL_STENCIL_VALUE_MASK: 187 case GL_STENCIL_VALUE_MASK:
188 return 1; 188 return 1;
189 case GL_STENCIL_WRITEMASK: 189 case GL_STENCIL_WRITEMASK:
190 return 1; 190 return 1;
191 case GL_SUBPIXEL_BITS: 191 case GL_SUBPIXEL_BITS:
192 return 1; 192 return 1;
193 case GL_TEXTURE_BINDING_2D: 193 case GL_TEXTURE_BINDING_2D:
194 return 1; 194 return 1;
195 case GL_TEXTURE_BINDING_CUBE_MAP: 195 case GL_TEXTURE_BINDING_CUBE_MAP:
196 return 1; 196 return 1;
197 case GL_TEXTURE_BINDING_EXTERNAL_OES:
198 return 1;
197 case GL_UNPACK_ALIGNMENT: 199 case GL_UNPACK_ALIGNMENT:
198 return 1; 200 return 1;
199 case GL_VIEWPORT: 201 case GL_VIEWPORT:
200 return 4; 202 return 4;
201 // -- glGetBooleanv, glGetFloatv, glGetIntergerv with 203 // -- glGetBooleanv, glGetFloatv, glGetIntergerv with
202 // GL_CHROMIUM_framebuffer_multisample 204 // GL_CHROMIUM_framebuffer_multisample
203 case GL_MAX_SAMPLES_EXT: 205 case GL_MAX_SAMPLES_EXT:
204 return 1; 206 return 1;
205 207
206 // -- glGetBufferParameteriv 208 // -- glGetBufferParameteriv
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 case GL_FLOAT_MAT2: 428 case GL_FLOAT_MAT2:
427 return sizeof(GLfloat) * 2 * 2; // NOLINT 429 return sizeof(GLfloat) * 2 * 2; // NOLINT
428 case GL_FLOAT_MAT3: 430 case GL_FLOAT_MAT3:
429 return sizeof(GLfloat) * 3 * 3; // NOLINT 431 return sizeof(GLfloat) * 3 * 3; // NOLINT
430 case GL_FLOAT_MAT4: 432 case GL_FLOAT_MAT4:
431 return sizeof(GLfloat) * 4 * 4; // NOLINT 433 return sizeof(GLfloat) * 4 * 4; // NOLINT
432 case GL_SAMPLER_2D: 434 case GL_SAMPLER_2D:
433 return sizeof(GLint); // NOLINT 435 return sizeof(GLint); // NOLINT
434 case GL_SAMPLER_CUBE: 436 case GL_SAMPLER_CUBE:
435 return sizeof(GLint); // NOLINT 437 return sizeof(GLint); // NOLINT
438 case GL_SAMPLER_EXTERNAL_OES:
439 return sizeof(GLint); // NOLINT
436 default: 440 default:
437 return 0; 441 return 0;
438 } 442 }
439 } 443 }
440 444
441 size_t GLES2Util::GetGLTypeSizeForTexturesAndBuffers(uint32 type) { 445 size_t GLES2Util::GetGLTypeSizeForTexturesAndBuffers(uint32 type) {
442 switch (type) { 446 switch (type) {
443 case GL_BYTE: 447 case GL_BYTE:
444 return sizeof(GLbyte); // NOLINT 448 return sizeof(GLbyte); // NOLINT
445 case GL_UNSIGNED_BYTE: 449 case GL_UNSIGNED_BYTE:
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 } 569 }
566 } 570 }
567 return GetStringEnum(value); 571 return GetStringEnum(value);
568 } 572 }
569 573
570 #include "../common/gles2_cmd_utils_implementation_autogen.h" 574 #include "../common/gles2_cmd_utils_implementation_autogen.h"
571 575
572 } // namespace gles2 576 } // namespace gles2
573 } // namespace gpu 577 } // namespace gpu
574 578
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_autogen.h ('k') | gpu/command_buffer/common/gles2_cmd_utils_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698