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

Side by Side Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 218193002: Mojo: Move C gles2 header files to mojo/public/c/gles2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """code generator for GLES2 command buffers.""" 6 """code generator for GLES2 command buffers."""
7 7
8 import itertools 8 import itertools
9 import os 9 import os
10 import os.path 10 import os.path
11 import sys 11 import sys
12 import re 12 import re
13 from optparse import OptionParser 13 from optparse import OptionParser
14 from subprocess import call 14 from subprocess import call
15 15
16 _SIZE_OF_UINT32 = 4 16 _SIZE_OF_UINT32 = 4
17 _SIZE_OF_COMMAND_HEADER = 4 17 _SIZE_OF_COMMAND_HEADER = 4
18 _FIRST_SPECIFIC_COMMAND_ID = 256 18 _FIRST_SPECIFIC_COMMAND_ID = 256
19 19
20 _LICENSE = """// Copyright (c) 2014 The Chromium Authors. All rights reserved. 20 _LICENSE = """// Copyright 2014 The Chromium Authors. All rights reserved.
21 // Use of this source code is governed by a BSD-style license that can be 21 // Use of this source code is governed by a BSD-style license that can be
22 // found in the LICENSE file. 22 // found in the LICENSE file.
23 23
24 """ 24 """
25 25
26 _DO_NOT_EDIT_WARNING = """// This file is auto-generated from 26 _DO_NOT_EDIT_WARNING = """// This file is auto-generated from
27 // gpu/command_buffer/build_gles2_cmd_buffer.py 27 // gpu/command_buffer/build_gles2_cmd_buffer.py
28 // It's formatted by clang-format using chromium coding style: 28 // It's formatted by clang-format using chromium coding style:
29 // clang-format -i -style=chromium filename 29 // clang-format -i -style=chromium filename
30 // DO NOT EDIT! 30 // DO NOT EDIT!
(...skipping 7806 matching lines...) Expand 10 before | Expand all | Expand 10 after
7837 gen.WriteClientContextStateImpl( 7837 gen.WriteClientContextStateImpl(
7838 "client/client_context_state_impl_autogen.h") 7838 "client/client_context_state_impl_autogen.h")
7839 gen.WriteServiceUnitTests("service/gles2_cmd_decoder_unittest_%d_autogen.h") 7839 gen.WriteServiceUnitTests("service/gles2_cmd_decoder_unittest_%d_autogen.h")
7840 gen.WriteServiceUtilsHeader("service/gles2_cmd_validation_autogen.h") 7840 gen.WriteServiceUtilsHeader("service/gles2_cmd_validation_autogen.h")
7841 gen.WriteServiceUtilsImplementation( 7841 gen.WriteServiceUtilsImplementation(
7842 "service/gles2_cmd_validation_implementation_autogen.h") 7842 "service/gles2_cmd_validation_implementation_autogen.h")
7843 gen.WriteCommonUtilsHeader("common/gles2_cmd_utils_autogen.h") 7843 gen.WriteCommonUtilsHeader("common/gles2_cmd_utils_autogen.h")
7844 gen.WriteCommonUtilsImpl("common/gles2_cmd_utils_implementation_autogen.h") 7844 gen.WriteCommonUtilsImpl("common/gles2_cmd_utils_implementation_autogen.h")
7845 gen.WriteGLES2Header("../GLES2/gl2chromium_autogen.h") 7845 gen.WriteGLES2Header("../GLES2/gl2chromium_autogen.h")
7846 gen.WriteMojoGLCallVisitor( 7846 gen.WriteMojoGLCallVisitor(
7847 "../../mojo/public/gles2/gles2_call_visitor_autogen.h") 7847 "../../mojo/public/c/gles2/gles2_call_visitor_autogen.h")
7848 7848
7849 Format([ 7849 Format([
7850 "common/gles2_cmd_format_autogen.h", 7850 "common/gles2_cmd_format_autogen.h",
7851 "common/gles2_cmd_format_test_autogen.h", 7851 "common/gles2_cmd_format_test_autogen.h",
7852 "common/gles2_cmd_ids_autogen.h", 7852 "common/gles2_cmd_ids_autogen.h",
7853 "common/gles2_cmd_utils_autogen.h", 7853 "common/gles2_cmd_utils_autogen.h",
7854 "common/gles2_cmd_utils_implementation_autogen.h", 7854 "common/gles2_cmd_utils_implementation_autogen.h",
7855 "client/client_context_state_autogen.h", 7855 "client/client_context_state_autogen.h",
7856 "client/client_context_state_impl_autogen.h", 7856 "client/client_context_state_impl_autogen.h",
7857 "client/gles2_cmd_helper_autogen.h", 7857 "client/gles2_cmd_helper_autogen.h",
(...skipping 11 matching lines...) Expand all
7869 "service/gles2_cmd_decoder_autogen.h", 7869 "service/gles2_cmd_decoder_autogen.h",
7870 "service/gles2_cmd_decoder_unittest_0_autogen.h", 7870 "service/gles2_cmd_decoder_unittest_0_autogen.h",
7871 "service/gles2_cmd_decoder_unittest_1_autogen.h", 7871 "service/gles2_cmd_decoder_unittest_1_autogen.h",
7872 "service/gles2_cmd_decoder_unittest_2_autogen.h", 7872 "service/gles2_cmd_decoder_unittest_2_autogen.h",
7873 "service/gles2_cmd_decoder_unittest_3_autogen.h", 7873 "service/gles2_cmd_decoder_unittest_3_autogen.h",
7874 "service/gles2_cmd_validation_autogen.h", 7874 "service/gles2_cmd_validation_autogen.h",
7875 "service/gles2_cmd_validation_implementation_autogen.h"]) 7875 "service/gles2_cmd_validation_implementation_autogen.h"])
7876 os.chdir("../..") 7876 os.chdir("../..")
7877 Format([ 7877 Format([
7878 "gpu/GLES2/gl2chromium_autogen.h", 7878 "gpu/GLES2/gl2chromium_autogen.h",
7879 "mojo/public/gles2/gles2_call_visitor_autogen.h", 7879 "mojo/public/c/gles2/gles2_call_visitor_autogen.h",
7880 "ppapi/c/dev/ppb_opengles2ext_dev.h", 7880 "ppapi/c/dev/ppb_opengles2ext_dev.h",
7881 "ppapi/c/ppb_opengles2.h", 7881 "ppapi/c/ppb_opengles2.h",
7882 "ppapi/lib/gl/gles2/gles2.c", 7882 "ppapi/lib/gl/gles2/gles2.c",
7883 "ppapi/shared_impl/ppb_opengles2_shared.cc"]) 7883 "ppapi/shared_impl/ppb_opengles2_shared.cc"])
7884 7884
7885 if gen.errors > 0: 7885 if gen.errors > 0:
7886 print "%d errors" % gen.errors 7886 print "%d errors" % gen.errors
7887 return 1 7887 return 1
7888 return 0 7888 return 0
7889 7889
7890 7890
7891 if __name__ == '__main__': 7891 if __name__ == '__main__':
7892 sys.exit(main(sys.argv[1:])) 7892 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « gpu/GLES2/gl2chromium_autogen.h ('k') | gpu/command_buffer/client/client_context_state_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698