original_docstring: Writes the service decorder implementation.
docstring: Writes the service decorder implementation.
docstring_tokens: Writes the service decorder implementation .
code: def WriteServiceImplementation(self, filename):
      """Writes the service decorder implementation."""
      file = CHeaderWriter(
          filename,
          "// It is included by gles2_cmd_decoder.cc\n")
  
      for func in self.functions:
        if True:
        #gen_cmd = func.GetInfo('gen_cmd')
        #if gen_cmd == True or gen_cmd == None:
          func.WriteServiceImplementation(file)
  
      file.Write("""
  bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) {
    switch (cap) {
  """)
      for capability in _CAPABILITY_FLAGS:
        file.Write("    case GL_%s:\n" % capability['name'].upper())
        if 'state_flag' in capability:
  
          file.Write("""\
              state_.enable_flags.%(name)s = enabled;
              if (state_.enable_flags.cached_%(name)s != enabled
                  || state_.ignore_cached_state) {
                %(state_flag)s = true;
              }
              return false;
              """ % capability)
        else:
          file.Write("""\
              state_.enable_flags.%(name)s = enabled;
              if (state_.enable_flags.cached_%(name)s != enabled
                  || state_.ignore_cached_state) {
                state_.enable_flags.cached_%(name)s = enabled;
                return true;
              }
              return false;
              """ % capability)
      file.Write("""    default:
        NOTREACHED();
        return false;
    }
  }
  """)
      file.Close()
      self.generated_cpp_filenames.append(file.filename)
code_tokens: def WriteServiceImplementation ( self , filename ) : file = CHeaderWriter ( filename , "// It is included by gles2_cmd_decoder.cc\n" ) for func in self . functions : if True : func . WriteServiceImplementation ( file ) file . Write ( """
  bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) {
    switch (cap) {
  """ ) for capability in _CAPABILITY_FLAGS : file . Write ( "    case GL_%s:\n" % capability [ 'name' ] . upper ( ) ) if 'state_flag' in capability : file . Write ( """\
              state_.enable_flags.%(name)s = enabled;
              if (state_.enable_flags.cached_%(name)s != enabled
                  || state_.ignore_cached_state) {
                %(state_flag)s = true;
              }
              return false;
              """ % capability ) else : file . Write ( """\
              state_.enable_flags.%(name)s = enabled;
              if (state_.enable_flags.cached_%(name)s != enabled
                  || state_.ignore_cached_state) {
                state_.enable_flags.cached_%(name)s = enabled;
                return true;
              }
              return false;
              """ % capability ) file . Write ( """    default:
        NOTREACHED();
        return false;
    }
  }
  """ ) file . Close ( ) self . generated_cpp_filenames . append ( file . filename )
short_docstring: Writes the service decorder implementation.
short_docstring_tokens: Writes the service decorder implementation .
comment: """Writes the service decorder implementation."""$SEP$#gen_cmd = func.GetInfo('gen_cmd')$SEP$#if gen_cmd == True or gen_cmd == None: