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

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

Issue 1750123002: Upgrade Tex{Sub}Image{2|3}D to handle ES3 unpack parameters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Attemp to fix random crashes on windows Created 4 years, 9 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
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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 return 8; 788 return 8;
789 case GL_FLOAT_MAT3x4: 789 case GL_FLOAT_MAT3x4:
790 case GL_FLOAT_MAT4x3: 790 case GL_FLOAT_MAT4x3:
791 return 12; 791 return 12;
792 792
793 default: 793 default:
794 return 0; 794 return 0;
795 } 795 }
796 } 796 }
797 797
798 size_t GLES2Util::GetGLTypeSizeForTextures(uint32_t type) {
799 return static_cast<size_t>(BytesPerElement(type));
800 }
801
798 size_t GLES2Util::GetGLTypeSizeForBuffers(uint32_t type) { 802 size_t GLES2Util::GetGLTypeSizeForBuffers(uint32_t type) {
799 switch (type) { 803 switch (type) {
800 case GL_BYTE: 804 case GL_BYTE:
801 return sizeof(GLbyte); // NOLINT 805 return sizeof(GLbyte); // NOLINT
802 case GL_UNSIGNED_BYTE: 806 case GL_UNSIGNED_BYTE:
803 return sizeof(GLubyte); // NOLINT 807 return sizeof(GLubyte); // NOLINT
804 case GL_SHORT: 808 case GL_SHORT:
805 return sizeof(GLshort); // NOLINT 809 return sizeof(GLshort); // NOLINT
806 case GL_UNSIGNED_SHORT: 810 case GL_UNSIGNED_SHORT:
807 return sizeof(GLushort); // NOLINT 811 return sizeof(GLushort); // NOLINT
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 } 1543 }
1540 1544
1541 return true; 1545 return true;
1542 } 1546 }
1543 1547
1544 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 1548 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
1545 1549
1546 } // namespace gles2 1550 } // namespace gles2
1547 } // namespace gpu 1551 } // namespace gpu
1548 1552
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698