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

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils.h

Issue 10855274: Fix Uniform Name Parsing (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/common/gles2_cmd_utils.h
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.h b/gpu/command_buffer/common/gles2_cmd_utils.h
index c4fe6632f6b71bb079e03ad52894de25f064c890..8b3d8a7faacc758880a157af386911735d9ba705 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils.h
@@ -146,6 +146,19 @@ class GLES2_UTILS_EXPORT GLES2Util {
static std::string GetStringBool(uint32 value);
static std::string GetStringError(uint32 value);
+ // Parses a uniform name.
+ // array_pos: the position of the last '[' character in name.
+ // element_index: the index of the array element specifed in the name.
+ // getting_array: True if name refers to array.
+ // returns true of parsing was successful. Returing true does NOT mean
+ // it's a valid uniform name. On the otherhand, returning false does mean
+ // it's an invalid uniform name.
+ static bool ParseUniformName(
+ const std::string& name,
+ size_t* array_pos,
+ int* element_index,
+ bool* getting_array);
+
#include "../common/gles2_cmd_utils_autogen.h"
private:

Powered by Google App Engine
This is Rietveld 408576698