| OLD | NEW |
| 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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 return sizeof(GLuint); // NOLINT | 695 return sizeof(GLuint); // NOLINT |
| 696 case GL_FLOAT: | 696 case GL_FLOAT: |
| 697 return sizeof(GLfloat); // NOLINT | 697 return sizeof(GLfloat); // NOLINT |
| 698 case GL_FIXED: | 698 case GL_FIXED: |
| 699 return sizeof(GLfixed); // NOLINT | 699 return sizeof(GLfixed); // NOLINT |
| 700 default: | 700 default: |
| 701 return 0; | 701 return 0; |
| 702 } | 702 } |
| 703 } | 703 } |
| 704 | 704 |
| 705 size_t GLES2Util::GetGLTypeSizeForPathCoordType(uint32 type) { |
| 706 switch (type) { |
| 707 case GL_BYTE: |
| 708 return sizeof(GLbyte); // NOLINT |
| 709 case GL_UNSIGNED_BYTE: |
| 710 return sizeof(GLubyte); // NOLINT |
| 711 case GL_SHORT: |
| 712 return sizeof(GLshort); // NOLINT |
| 713 case GL_UNSIGNED_SHORT: |
| 714 return sizeof(GLushort); // NOLINT |
| 715 case GL_FLOAT: |
| 716 return sizeof(GLfloat); // NOLINT |
| 717 default: |
| 718 return 0; |
| 719 } |
| 720 } |
| 721 |
| 705 uint32 GLES2Util::GLErrorToErrorBit(uint32 error) { | 722 uint32 GLES2Util::GLErrorToErrorBit(uint32 error) { |
| 706 switch (error) { | 723 switch (error) { |
| 707 case GL_INVALID_ENUM: | 724 case GL_INVALID_ENUM: |
| 708 return gl_error_bit::kInvalidEnum; | 725 return gl_error_bit::kInvalidEnum; |
| 709 case GL_INVALID_VALUE: | 726 case GL_INVALID_VALUE: |
| 710 return gl_error_bit::kInvalidValue; | 727 return gl_error_bit::kInvalidValue; |
| 711 case GL_INVALID_OPERATION: | 728 case GL_INVALID_OPERATION: |
| 712 return gl_error_bit::kInvalidOperation; | 729 return gl_error_bit::kInvalidOperation; |
| 713 case GL_OUT_OF_MEMORY: | 730 case GL_OUT_OF_MEMORY: |
| 714 return gl_error_bit::kOutOfMemory; | 731 return gl_error_bit::kOutOfMemory; |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 } | 1229 } |
| 1213 | 1230 |
| 1214 return true; | 1231 return true; |
| 1215 } | 1232 } |
| 1216 | 1233 |
| 1217 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" | 1234 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" |
| 1218 | 1235 |
| 1219 } // namespace gles2 | 1236 } // namespace gles2 |
| 1220 } // namespace gpu | 1237 } // namespace gpu |
| 1221 | 1238 |
| OLD | NEW |