gpu/command_buffer/build_cmd_buffer_lib.py
def WriteGLES2CLibImplementation(self, filename):
    """Writes the GLES2 c lib implementation."""
    comment = "// These functions emulate GLES2 over command buffers.\n"
    with CHeaderWriter(filename, self.year, comment) as f:
      for func in self.original_functions:
        func.WriteGLES2CLibImplementation(f)
      f.write("""
namespace gles2 {

extern const NameToFunc g_gles2_function_table[] = {
""")
      for func in self.original_functions:
        f.write(
            '  { "gl%s", reinterpret_cast<GLES2FunctionPointer>(gl%s), },\n' %
            (func.name, func.name))
      f.write("""  { nullptr, nullptr, },
};

}  // namespace gles2
""")
    self.generated_cpp_filenames.append(filename)
Writes the GLES2 c lib implementation.
Writes the GLES2 c lib implementation.
Writes the GLES2 c lib implementation .
def WriteGLES2CLibImplementation(self, filename):
    comment = "// These functions emulate GLES2 over command buffers.\n"
    with CHeaderWriter(filename, self.year, comment) as f:
      for func in self.original_functions:
        func.WriteGLES2CLibImplementation(f)
      f.write("""
namespace gles2 {
extern const NameToFunc g_gles2_function_table[] = {
""")
      for func in self.original_functions:
        f.write(
            '  { "gl%s", reinterpret_cast<GLES2FunctionPointer>(gl%s), },\n' %
            (func.name, func.name))
      f.write("""  { nullptr, nullptr, },
};
}  // namespace gles2
""")
    self.generated_cpp_filenames.append(filename)
def WriteGLES2CLibImplementation ( self , filename ) : comment = "// These functions emulate GLES2 over command buffers.\n" with CHeaderWriter ( filename , self . year , comment ) as f : for func in self . original_functions : func . WriteGLES2CLibImplementation ( f ) f . write ( """
namespace gles2 {

extern const NameToFunc g_gles2_function_table[] = {
""" ) for func in self . original_functions : f . write ( '  { "gl%s", reinterpret_cast<GLES2FunctionPointer>(gl%s), },\n' % ( func . name , func . name ) ) f . write ( """  { nullptr, nullptr, },
};

}  // namespace gles2
""" ) self . generated_cpp_filenames . append ( filename )
Writes the GLES2 c lib implementation.
Writes the GLES2 c lib implementation .
"""Writes the GLES2 c lib implementation."""
self
filename