gpu/command_buffer/build_cmd_buffer_lib.py
def WriteServiceHandlerFunctionHeader(self, func, f):
    """Writes function header for service implementation handlers."""
    f.write("""error::Error %(prefix)sDecoderImpl::Handle%(name)s(
        uint32_t immediate_data_size, const volatile void* cmd_data) {
      """ % {'name': func.name, 'prefix' : _prefix})
    if func.IsES3():
      f.write("""if (!feature_info_->IsWebGL2OrES3OrHigherContext())
          return error::kUnknownCommand;
        """)
    if func.IsES31():
      f.write("""return error::kUnknownCommand;
        }

        """)
      return
    if func.GetCmdArgs():
      f.write("""const volatile %(prefix)s::cmds::%(name)s& c =
            *static_cast<const volatile %(prefix)s::cmds::%(name)s*>(cmd_data);
        """ % {'name': func.name, 'prefix': _lower_prefix})
Writes function header for service implementation handlers.
Writes function header for service implementation handlers.
Writes function header for service implementation handlers .
def WriteServiceHandlerFunctionHeader(self, func, f):
    f.write("""error::Error %(prefix)sDecoderImpl::Handle%(name)s(
        uint32_t immediate_data_size, const volatile void* cmd_data) {
      """ % {'name': func.name, 'prefix' : _prefix})
    if func.IsES3():
      f.write("""if (!feature_info_->IsWebGL2OrES3OrHigherContext())
          return error::kUnknownCommand;
        """)
    if func.IsES31():
      f.write("""return error::kUnknownCommand;
        }
        """)
      return
    if func.GetCmdArgs():
      f.write("""const volatile %(prefix)s::cmds::%(name)s& c =
            *static_cast<const volatile %(prefix)s::cmds::%(name)s*>(cmd_data);
        """ % {'name': func.name, 'prefix': _lower_prefix})
def WriteServiceHandlerFunctionHeader ( self , func , f ) : f . write ( """error::Error %(prefix)sDecoderImpl::Handle%(name)s(
        uint32_t immediate_data_size, const volatile void* cmd_data) {
      """ % { 'name' : func . name , 'prefix' : _prefix } ) if func . IsES3 ( ) : f . write ( """if (!feature_info_->IsWebGL2OrES3OrHigherContext())
          return error::kUnknownCommand;
        """ ) if func . IsES31 ( ) : f . write ( """return error::kUnknownCommand;
        }

        """ ) return if func . GetCmdArgs ( ) : f . write ( """const volatile %(prefix)s::cmds::%(name)s& c =
            *static_cast<const volatile %(prefix)s::cmds::%(name)s*>(cmd_data);
        """ % { 'name' : func . name , 'prefix' : _lower_prefix } )
Writes function header for service implementation handlers.
Writes function header for service implementation handlers .
"""Writes function header for service implementation handlers."""
self
func
f