//
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-es v2.2.2 with parameter "target=ts"
// @generated from file protos/perfetto/metrics/android/g2d_metric.proto (package perfetto.protos, syntax proto2)
/* eslint-disable */

import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file protos/perfetto/metrics/android/g2d_metric.proto.
 */
export const file_protos_perfetto_metrics_android_g2d_metric: GenFile = /*@__PURE__*/
  fileDesc("CjBwcm90b3MvcGVyZmV0dG8vbWV0cmljcy9hbmRyb2lkL2cyZF9tZXRyaWMucHJvdG8SD3BlcmZldHRvLnByb3RvcyK6AwoKRzJkTWV0cmljcxI1CgZnMmRfaHcYASABKAsyJS5wZXJmZXR0by5wcm90b3MuRzJkTWV0cmljcy5HMmRNZXRyaWMSNQoGZzJkX3N3GAIgASgLMiUucGVyZmV0dG8ucHJvdG9zLkcyZE1ldHJpY3MuRzJkTWV0cmljGocBCgtHMmRJbnN0YW5jZRIMCgRuYW1lGAEgASgJEhMKC2ZyYW1lX2NvdW50GAUgASgNEhMKC2Vycm9yX2NvdW50GAYgASgNEhIKCm1heF9kdXJfbXMYByABKAESEgoKbWluX2R1cl9tcxgIIAEoARISCgphdmdfZHVyX21zGAkgASgBSgQIAhAFGrMBCglHMmRNZXRyaWMSOgoJaW5zdGFuY2VzGAEgAygLMicucGVyZmV0dG8ucHJvdG9zLkcyZE1ldHJpY3MuRzJkSW5zdGFuY2USEwoLZnJhbWVfY291bnQYBSABKA0SEwoLZXJyb3JfY291bnQYBiABKA0SEgoKbWF4X2R1cl9tcxgHIAEoARISCgptaW5fZHVyX21zGAggASgBEhIKCmF2Z19kdXJfbXMYCSABKAFKBAgCEAU");

/**
 * @generated from message perfetto.protos.G2dMetrics
 */
export type G2dMetrics = Message<"perfetto.protos.G2dMetrics"> & {
  /**
   * @generated from field: optional perfetto.protos.G2dMetrics.G2dMetric g2d_hw = 1;
   */
  g2dHw?: G2dMetrics_G2dMetric;

  /**
   * @generated from field: optional perfetto.protos.G2dMetrics.G2dMetric g2d_sw = 2;
   */
  g2dSw?: G2dMetrics_G2dMetric;
};

/**
 * Describes the message perfetto.protos.G2dMetrics.
 * Use `create(G2dMetricsSchema)` to create a new message.
 */
export const G2dMetricsSchema: GenMessage<G2dMetrics> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_g2d_metric, 0);

/**
 * @generated from message perfetto.protos.G2dMetrics.G2dInstance
 */
export type G2dMetrics_G2dInstance = Message<"perfetto.protos.G2dMetrics.G2dInstance"> & {
  /**
   * G2d name.
   *
   * @generated from field: optional string name = 1;
   */
  name: string;

  /**
   * @generated from field: optional uint32 frame_count = 5;
   */
  frameCount: number;

  /**
   * @generated from field: optional uint32 error_count = 6;
   */
  errorCount: number;

  /**
   * @generated from field: optional double max_dur_ms = 7;
   */
  maxDurMs: number;

  /**
   * @generated from field: optional double min_dur_ms = 8;
   */
  minDurMs: number;

  /**
   * @generated from field: optional double avg_dur_ms = 9;
   */
  avgDurMs: number;
};

/**
 * Describes the message perfetto.protos.G2dMetrics.G2dInstance.
 * Use `create(G2dMetrics_G2dInstanceSchema)` to create a new message.
 */
export const G2dMetrics_G2dInstanceSchema: GenMessage<G2dMetrics_G2dInstance> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_g2d_metric, 0, 0);

/**
 * @generated from message perfetto.protos.G2dMetrics.G2dMetric
 */
export type G2dMetrics_G2dMetric = Message<"perfetto.protos.G2dMetrics.G2dMetric"> & {
  /**
   * G2D Metric for each G2D Instance.
   *
   * @generated from field: repeated perfetto.protos.G2dMetrics.G2dInstance instances = 1;
   */
  instances: G2dMetrics_G2dInstance[];

  /**
   * the number of frames processed by G2D
   *
   * @generated from field: optional uint32 frame_count = 5;
   */
  frameCount: number;

  /**
   * the number of error events
   *
   * @generated from field: optional uint32 error_count = 6;
   */
  errorCount: number;

  /**
   * max/min/avg G2d frame durations for all instances.
   *
   * @generated from field: optional double max_dur_ms = 7;
   */
  maxDurMs: number;

  /**
   * @generated from field: optional double min_dur_ms = 8;
   */
  minDurMs: number;

  /**
   * @generated from field: optional double avg_dur_ms = 9;
   */
  avgDurMs: number;
};

/**
 * Describes the message perfetto.protos.G2dMetrics.G2dMetric.
 * Use `create(G2dMetrics_G2dMetricSchema)` to create a new message.
 */
export const G2dMetrics_G2dMetricSchema: GenMessage<G2dMetrics_G2dMetric> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_g2d_metric, 0, 1);

