diff options
author | neb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-31 23:39:57 +0000 |
---|---|---|
committer | neb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-31 23:39:57 +0000 |
commit | 4e3f0ab69737fa199e544cd11726583d84944d65 (patch) | |
tree | f96c62b72cc5df1f58ac544a960a1b1f0abb038e /gpu | |
parent | 6e771985c39613c83dfa6d7e8dbfc8ecfdaa8660 (diff) | |
download | chromium_src-4e3f0ab69737fa199e544cd11726583d84944d65.zip chromium_src-4e3f0ab69737fa199e544cd11726583d84944d65.tar.gz chromium_src-4e3f0ab69737fa199e544cd11726583d84944d65.tar.bz2 |
Make target running GLES2 autogen script.
Also lays groundwork for rebuilding Pepper OpenGL ES bindings as part of the build.
BUG=none
TEST=run "make ppapi_gles_bindings" or "make ppapi_gles_implementation".
Review URL: http://codereview.chromium.org/5212006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rwxr-xr-x | gpu/command_buffer/build_gles2_cmd_buffer.py | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index 522be5e..93b13ea 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -5400,28 +5400,41 @@ def main(argv): parser.add_option( "--alternate-mode", type="choice", choices=("ppapi", "chrome_ppapi"), - help="generate files for other projects. \"ppapi\" must be run from the " - "directory containing the ppapi directory, and will generate ppapi " - "bindings. \"chrome_ppapi\" must be run from chrome src directory and " - "will generate chrome plumbing for ppapi.") + help="generate files for other projects. \"ppapi\" will generate ppapi " + "bindings. \"chrome_ppapi\" generate chrome implementation for ppapi.") + parser.add_option( + "--output-dir", + help="base directory for resulting files, under chrome/src. default is " + "empty. Use this if you want the result stored under gen.") parser.add_option( "-v", "--verbose", action="store_true", help="prints more output.") (options, args) = parser.parse_args(args=argv) + # This script lives under gpu/command_buffer, cd to base directory. + os.chdir(os.path.dirname(__file__) + "/../..") + gen = GLGenerator(options.verbose) gen.ParseGLH("common/GLES2/gl2.h") + # Support generating files under gen/ + if options.output_dir != None: + os.chdir(options.output_dir) + if options.alternate_mode == "ppapi": - gen.WritePepperGLES2Interface("ppapi/c/dev/ppb_opengles_dev.h") - gen.WriteGLES2ToPPAPIBridge("ppapi/lib/gl/gles2/gles2.c") + # To trigger this action, do "make ppapi_gles_bindings" + os.chdir("ppapi"); + gen.WritePepperGLES2Interface("c/dev/ppb_opengles_dev.h") + gen.WriteGLES2ToPPAPIBridge("lib/gl/gles2/gles2.c") elif options.alternate_mode == "chrome_ppapi": + # To trigger this action, do "make ppapi_gles_implementation" gen.WritePepperGLES2Implementation( "webkit/plugins/ppapi/ppb_opengles_impl.cc") else: + os.chdir("gpu/command_buffer") gen.WriteCommandIds("common/gles2_cmd_ids_autogen.h") gen.WriteFormat("common/gles2_cmd_format_autogen.h") gen.WriteFormatTest("common/gles2_cmd_format_test_autogen.h") |