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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 } 784 }
785 } 785 }
786 return GetStringEnum(value); 786 return GetStringEnum(value);
787 } 787 }
788 788
789 bool GLES2Util::ParseUniformName( 789 bool GLES2Util::ParseUniformName(
790 const std::string& name, 790 const std::string& name,
791 size_t* array_pos, 791 size_t* array_pos,
792 int* element_index, 792 int* element_index,
793 bool* getting_array) { 793 bool* getting_array) {
794 if (name.empty())
795 return false;
794 bool getting_array_location = false; 796 bool getting_array_location = false;
795 size_t open_pos = std::string::npos; 797 size_t open_pos = std::string::npos;
796 base::CheckedNumeric<int> index = 0; 798 base::CheckedNumeric<int> index = 0;
797 if (name[name.size() - 1] == ']') { 799 if (name[name.size() - 1] == ']') {
798 if (name.size() < 3) { 800 if (name.size() < 3) {
799 return false; 801 return false;
800 } 802 }
801 open_pos = name.find_last_of('['); 803 open_pos = name.find_last_of('[');
802 if (open_pos == std::string::npos || 804 if (open_pos == std::string::npos ||
803 open_pos >= name.size() - 2) { 805 open_pos >= name.size() - 2) {
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 } 992 }
991 993
992 return true; 994 return true;
993 } 995 }
994 996
995 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 997 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
996 998
997 } // namespace gles2 999 } // namespace gles2
998 } // namespace gpu 1000 } // namespace gpu
999 1001
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_ids_autogen.h ('k') | gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698