beginComputePass method

  1. @override
ComputeEncoder beginComputePass({
  1. String? label,
  2. PassTimestampWrites? timestampWrites,
})
override

Opens a compute pass; label names it to a debugger and to onGpuTimings. timestampWrites (since 1.0) names where the pass writes its start and end GPU times — DeviceFeature.timestampQuery.

Implementation

@override
ComputeEncoder beginComputePass({
  String? label,
  PassTimestampWrites? timestampWrites,
}) {
  if (timestampWrites != null) {
    _unrecorded('beginComputePass.timestampWrites');
  }
  final encoder = inner.beginComputePass(
    label: label,
    timestampWrites: timestampWrites,
  );
  final pass = _nextPass++;
  events.add(TraceBeginComputePass(pass, label));
  return _RecordingComputeEncoder(this, pass, encoder);
}