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

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

Issue 6028005: Make CopyTexImage2D and CopyTexSubImage2D fail if... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <GLES2/gl2.h> 8 #include <GLES2/gl2.h>
9 #include <GLES2/gl2ext.h> 9 #include <GLES2/gl2ext.h>
10 #include <GLES2/gles2_command_buffer.h> 10 #include <GLES2/gles2_command_buffer.h>
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 GL_TEXTURE_CUBE_MAP_POSITIVE_X, 492 GL_TEXTURE_CUBE_MAP_POSITIVE_X,
493 GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 493 GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
494 GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 494 GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
495 GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 495 GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
496 GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 496 GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
497 GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 497 GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,
498 }; 498 };
499 return faces[index]; 499 return faces[index];
500 } 500 }
501 501
502 uint32 GLES2Util::GetChannelsForFormat(int format) {
503 switch (format) {
504 case GL_ALPHA:
505 return 0x0008;
506 case GL_LUMINANCE:
507 return 0x0007;
508 case GL_LUMINANCE_ALPHA:
509 return 0x000F;
510 case GL_RGB:
511 case GL_RGB565:
512 return 0x0007;
513 case GL_RGBA:
514 case GL_RGBA4:
515 case GL_RGB5_A1:
516 return 0x000F;
517 default:
518 return 0x0000;
519 }
520 }
521
502 } // namespace gles2 522 } // namespace gles2
503 } // namespace gpu 523 } // namespace gpu
504 524
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/service/framebuffer_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698