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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « gpu/GLES2/gl2extchromium.h ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/build_gles2_cmd_buffer.py
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 226cb738a55d58fd482cacf7d2a65e2c14e73661..7cccd436415d7153c9b40f223242588a869230d8 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -8309,8 +8309,14 @@ extern const NameToFunc g_gles2_function_table[] = {
if m:
name = m.group(1)
value = m.group(2)
- if len(value) <= 10 and not value in dict:
- dict[value] = name
+ if len(value) <= 10:
+ if not value in dict:
+ dict[value] = name
+ # check our own _CHROMIUM macro conflicts with khronos GL headers.
+ elif dict[value] != name and (name.endswith('_CHROMIUM') or
+ dict[value].endswith('_CHROMIUM')):
+ self.Error("code collision: %s and %s have the same code %s" %
+ (dict[value], name, value))
file = CHeaderWriter(filename)
file.Write("static const GLES2Util::EnumToString "
« no previous file with comments | « gpu/GLES2/gl2extchromium.h ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698