Chromium Code Reviews| 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..8ca81ae0a4ae3ef07523d406f6a2d3491fbd45b7 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_prefix' : 'Do', |
| + '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_prefix' 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,8 +10533,13 @@ 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] |
| + func_name = state['func'] |
| + if 'custom_function_prefix' in state: |
| + func_prefix = state['custom_function_prefix']; |
| + if func_name.startswith(func_prefix): |
| + func_name = func_name[len(func_prefix):] |
|
piman
2016/11/09 16:32:13
Mmh, the reason I suggested manual code for the te
Lof
2016/11/09 22:14:19
Done.
|
| f.write(" EXPECT_CALL(*gl_, %s(%s))\n" % |
| - (state['func'], ", ".join(args))) |
| + (func_name, ", ".join(args))) |
| f.write(" .Times(1)\n") |
| f.write(" .RetiresOnSaturation();\n") |
| if 'extension_flag' in state: |