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

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: 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1529 } 1533 }
1530 1534
1531 return true; 1535 return true;
1532 } 1536 }
1533 1537
1534 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 1538 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
1535 1539
1536 } // namespace gles2 1540 } // namespace gles2
1537 } // namespace gpu 1541 } // namespace gpu
1538 1542
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698