gpu/command_buffer/build_cmd_buffer_lib.py
def WriteCmdInit(self, f):
    """Writes the cmd's Init function."""
    f.write("  void Init(%s) {\n" % self.MakeTypedCmdArgString("_"))
    f.write("    SetHeader();\n")
    args = self.GetCmdArgs()
    for arg in args:
      arg.WriteSetCode(f, 4, '_%s' % arg.name)
    if self.GetInfo("trace_queueing_flow", False):
      trace = 'TRACE_DISABLED_BY_DEFAULT("gpu_cmd_queue")'
      f.write('bool is_tracing = false;')
      f.write('TRACE_EVENT_CATEGORY_GROUP_ENABLED(%s, &is_tracing);' % trace)
      f.write('if (is_tracing) {')
      f.write('  trace_id = base::RandUint64();')
      f.write('TRACE_EVENT_WITH_FLOW1(%s, "CommandBufferQueue",' % trace)
      f.write('trace_id, TRACE_EVENT_FLAG_FLOW_OUT,')
      f.write('"command", "%s");' % self.name)
      f.write('} else {\n  trace_id = 0;\n}\n');
    f.write("}\n")
    f.write("\n")
Writes the cmd's Init function.
Writes the cmd's Init function.
Writes the cmd ' s Init function .
def WriteCmdInit(self, f):
    f.write("  void Init(%s) {\n" % self.MakeTypedCmdArgString("_"))
    f.write("    SetHeader();\n")
    args = self.GetCmdArgs()
    for arg in args:
      arg.WriteSetCode(f, 4, '_%s' % arg.name)
    if self.GetInfo("trace_queueing_flow", False):
      trace = 'TRACE_DISABLED_BY_DEFAULT("gpu_cmd_queue")'
      f.write('bool is_tracing = false;')
      f.write('TRACE_EVENT_CATEGORY_GROUP_ENABLED(%s, &is_tracing);' % trace)
      f.write('if (is_tracing) {')
      f.write('  trace_id = base::RandUint64();')
      f.write('TRACE_EVENT_WITH_FLOW1(%s, "CommandBufferQueue",' % trace)
      f.write('trace_id, TRACE_EVENT_FLAG_FLOW_OUT,')
      f.write('"command", "%s");' % self.name)
      f.write('} else {\n  trace_id = 0;\n}\n');
    f.write("}\n")
    f.write("\n")
def WriteCmdInit ( self , f ) : f . write ( "  void Init(%s) {\n" % self . MakeTypedCmdArgString ( "_" ) ) f . write ( "    SetHeader();\n" ) args = self . GetCmdArgs ( ) for arg in args : arg . WriteSetCode ( f , 4 , '_%s' % arg . name ) if self . GetInfo ( "trace_queueing_flow" , False ) : trace = 'TRACE_DISABLED_BY_DEFAULT("gpu_cmd_queue")' f . write ( 'bool is_tracing = false;' ) f . write ( 'TRACE_EVENT_CATEGORY_GROUP_ENABLED(%s, &is_tracing);' % trace ) f . write ( 'if (is_tracing) {' ) f . write ( '  trace_id = base::RandUint64();' ) f . write ( 'TRACE_EVENT_WITH_FLOW1(%s, "CommandBufferQueue",' % trace ) f . write ( 'trace_id, TRACE_EVENT_FLAG_FLOW_OUT,' ) f . write ( '"command", "%s");' % self . name ) f . write ( '} else {\n  trace_id = 0;\n}\n' ) ; f . write ( "}\n" ) f . write ( "\n" )
Writes the cmd's Init function.
Writes the cmd ' s Init function .
"""Writes the cmd's Init function."""
self
f