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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 2482673002: fix --show-composited-layer-borders on Mac (Closed)
Patch Set: small fix Created 4 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 | « no previous file | gpu/command_buffer/service/context_state.h » ('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 49518430b545ed91b835d9c2168106ed3692ba2b..d8c5f46c14d8c5ed411efa1354612f0a950f46a1 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -501,7 +501,8 @@ _STATES = {
# GL_ACTIVE_TEXTURE
'LineWidth': {
'type': 'Normal',
- 'func': 'LineWidth',
+ 'custom_function' : True,
+ 'func': 'DoLineWidth',
'enum': 'GL_LINE_WIDTH',
'states': [
{
@@ -10273,7 +10274,10 @@ void ContextState::InitState(const ContextState *prev_state) const {
(item_name, item_name))
if test_prev:
f.write(" )\n")
- f.write(" gl%s(%s);\n" % (state['func'], ", ".join(args)))
+ if 'custom_function' in state:
+ f.write(" %s(%s);\n" % (state['func'], ", ".join(args)))
+ else:
+ f.write(" gl%s(%s);\n" % (state['func'], ", ".join(args)))
f.write(" if (prev_state) {")
WriteStates(True)
@@ -10529,10 +10533,14 @@ void GLES2DecoderTestBase::SetupInitStateExpectations(bool es3_capable) {
args.append(item['default'])
# TODO: Currently we do not check array values.
args = ["_" if isinstance(arg, list) else arg for arg in args]
- f.write(" EXPECT_CALL(*gl_, %s(%s))\n" %
- (state['func'], ", ".join(args)))
- f.write(" .Times(1)\n")
- f.write(" .RetiresOnSaturation();\n")
+ if 'custom_function' in state:
+ f.write(" SetupInitStateManualExpectationsFor%s(%s);\n" %
+ (state['func'], ", ".join(args)))
+ else:
+ f.write(" EXPECT_CALL(*gl_, %s(%s))\n" %
+ (state['func'], ", ".join(args)))
+ f.write(" .Times(1)\n")
+ f.write(" .RetiresOnSaturation();\n")
if 'extension_flag' in state:
f.write(" }\n")
f.write(" SetupInitStateManualExpectations(es3_capable);\n")
« no previous file with comments | « no previous file | gpu/command_buffer/service/context_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698