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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 12542009: Revert "Revert 186416" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.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 e826abd08186e5908f5f35bda49fdb6cde168cd8..a408db798f28cff0233903702685f5735982165a 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -1176,6 +1176,7 @@ _PEPPER_INTERFACES = [
# when they can not be automatically determined.
# pepper_interface: The pepper interface that is used for this extension
# invalid_test: False if no invalid test needed.
+# shadowed: True = the value is shadowed so no glGetXXX call will be made.
_FUNCTION_INFO = {
'ActiveTexture': {
@@ -1563,7 +1564,13 @@ _FUNCTION_INFO = {
'decoder_func': 'DoGetBooleanv',
'gl_test_func': 'glGetBooleanv',
},
- 'GetBufferParameteriv': {'type': 'GETn', 'result': ['SizedResult<GLint>']},
+ 'GetBufferParameteriv': {
+ 'type': 'GETn',
+ 'result': ['SizedResult<GLint>'],
+ 'decoder_func': 'DoGetBufferParameteriv',
+ 'expectation': False,
+ 'shadowed': True,
+ },
'GetError': {
'type': 'Is',
'decoder_func': 'GetGLError',
@@ -4345,11 +4352,19 @@ class GETnHandler(TypeHandler):
if (result->size != 0) {
return error::kInvalidArguments;
}
- CopyRealGLErrorsToWrapper();
"""
+ shadowed = func.GetInfo('shadowed')
+ if not shadowed:
+ file.Write(" CopyRealGLErrorsToWrapper();\n");
file.Write(code)
func.WriteHandlerImplementation(file)
- code = """ GLenum error = glGetError();
+ if shadowed:
+ code = """ result->SetNumResults(num_values);
+ return error::kNoError;
+}
+"""
+ else:
+ code = """ GLenum error = glGetError();
if (error == GL_NO_ERROR) {
result->SetNumResults(num_values);
} else {
« no previous file with comments | « no previous file | 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