diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-30 22:05:46 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-30 22:05:46 +0000 |
commit | dd289a5d63719ec985f1da01f9e5bca94e83633e (patch) | |
tree | 0eb0b740bc0fc56200ab522de5ae43eb0b8a700e /ui/gl | |
parent | 9fb0dce320b630f9e2e10ff091d8b359a7279410 (diff) | |
download | chromium_src-dd289a5d63719ec985f1da01f9e5bca94e83633e.zip chromium_src-dd289a5d63719ec985f1da01f9e5bca94e83633e.tar.gz chromium_src-dd289a5d63719ec985f1da01f9e5bca94e83633e.tar.bz2 |
Add workaround ATI/AMD bug with gl_PointCoord
TEST=gl test
BUG=135220
Review URL: https://chromiumcodereview.appspot.com/10692047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145091 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gl')
-rwxr-xr-x | ui/gl/generate_bindings.py | 94 | ||||
-rw-r--r-- | ui/gl/gl_interface.h | 2 |
2 files changed, 50 insertions, 46 deletions
diff --git a/ui/gl/generate_bindings.py b/ui/gl/generate_bindings.py index de6b521..5e7eccd 100755 --- a/ui/gl/generate_bindings.py +++ b/ui/gl/generate_bindings.py @@ -418,6 +418,9 @@ GL_FUNCTIONS = [ 'names': ['glPixelStorei'], 'arguments': 'GLenum pname, GLint param', }, { 'return_type': 'void', + 'names': ['glPointParameteri'], + 'arguments': 'GLenum pname, GLint param', }, +{ 'return_type': 'void', 'names': ['glPolygonOffset'], 'arguments': 'GLfloat factor, GLfloat units', }, { 'return_type': 'void', @@ -1079,26 +1082,25 @@ def GenerateHeader(file, functions, set_name, used_extension_functions): """Generates gl_binding_autogen_x.h""" # Write file header. - file.write('// Copyright (c) 2011 The Chromium Authors. All rights reserved.\n') - file.write('// Use of this source code is governed by a BSD-style license that can be\n') - file.write('// found in the LICENSE file.\n') - file.write('\n') - file.write('// This file is automatically generated.\n') - file.write('\n') - file.write('#ifndef UI_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % set_name.upper()) - file.write('#define UI_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % set_name.upper()) + file.write( +"""// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. - # Write prototype for initialization function. - file.write('\n') - file.write('namespace gfx {\n') - file.write('\n') - file.write('class GLContext;\n') - file.write('\n') - file.write('void InitializeGLBindings%s();\n' % set_name.upper()) - file.write('void InitializeGLExtensionBindings%s(GLContext* context);\n' % - set_name.upper()) - file.write('void InitializeDebugGLBindings%s();\n' % set_name.upper()) - file.write('void ClearGLBindings%s();\n' % set_name.upper()) +// This file is automatically generated. + +#ifndef UI_GFX_GL_GL_BINDINGS_AUTOGEN_%(name)s_H_ +#define UI_GFX_GL_GL_BINDINGS_AUTOGEN_%(name)s_H_ + +namespace gfx { + +class GLContext; + +void InitializeGLBindings%(name)s(); +void InitializeGLExtensionBindings%(name)s(GLContext* context); +void InitializeDebugGLBindings%(name)s(); +void ClearGLBindings%(name)s(); +""" % {'name': set_name.upper()}) # Write typedefs for function pointer types. Always use the GL name for the # typedef. @@ -1137,24 +1139,24 @@ def GenerateSource(file, functions, set_name, used_extension_functions): """Generates gl_binding_autogen_x.cc""" # Write file header. - file.write('// Copyright (c) 2011 The Chromium Authors. All rights reserved.\n') - file.write('// Use of this source code is governed by a BSD-style license that can be\n') - file.write('// found in the LICENSE file.\n') - file.write('\n') - file.write('// This file is automatically generated.\n') - file.write('\n') - file.write('#include <string>\n') - file.write('#include "gpu/command_buffer/common/gles2_cmd_utils.h"\n') - file.write('#include "ui/gl/gl_bindings.h"\n') - file.write('#include "ui/gl/gl_context.h"\n') - file.write('#include "ui/gl/gl_implementation.h"\n') + file.write( +"""// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// This file is automatically generated. + +#include <string> +#include "gpu/command_buffer/common/gles2_cmd_utils.h" +#include "ui/gl/gl_bindings.h" +#include "ui/gl/gl_context.h" +#include "ui/gl/gl_implementation.h" + +using gpu::gles2::GLES2Util; +namespace gfx { +""") # Write definitions for booleans indicating which extensions are available. - file.write('\n') - file.write('using gpu::gles2::GLES2Util;\n') - file.write('\n') - file.write('namespace gfx {\n') - file.write('\n') for extension, ext_functions in used_extension_functions: file.write('bool g_%s;\n' % extension) @@ -1329,19 +1331,19 @@ def GenerateSource(file, functions, set_name, used_extension_functions): def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" - file.write('// Copyright (c) 2011 The Chromium Authors. All rights reserved.\n') - file.write('// Use of this source code is governed by a BSD-style license that can be\n') - file.write('// found in the LICENSE file.\n') - file.write('\n') - file.write('// This file is automatically generated.\n') - file.write('\n') - file.write('#include <string.h>\n') - file.write('\n') - file.write('#include "ui/gl/gl_interface.h"\n') + file.write( +"""// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. - file.write('\n') - file.write('namespace gfx {\n') +// This file is automatically generated. + +#include <string.h> + +#include "ui/gl/gl_interface.h" +namespace gfx { +""") # Write function that trampoline into the GLInterface. for func in functions: file.write('\n') diff --git a/ui/gl/gl_interface.h b/ui/gl/gl_interface.h index db120b6..e5f8fa5 100644 --- a/ui/gl/gl_interface.h +++ b/ui/gl/gl_interface.h @@ -395,6 +395,8 @@ class GL_EXPORT GLInterface { virtual void PixelStorei(GLenum pname, GLint param) = 0; + virtual void PointParameteri(GLenum pname, GLint param) = 0; + virtual void PolygonOffset(GLfloat factor, GLfloat units) = 0; virtual void QueryCounter(GLuint id, GLenum target) = 0; |