chromium/gpu/config/device_perf_info.h

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef GPU_CONFIG_DEVICE_PERF_INFO_H_
#define GPU_CONFIG_DEVICE_PERF_INFO_H_

#include <cstdint>
#include <optional>

#include "build/build_config.h"
#include "gpu/gpu_export.h"

#if BUILDFLAG(IS_WIN)
#include <d3dcommon.h>
#endif

namespace gpu {

// These values are persistent to logs. Entries should not be renumbered and
// numeric values should never be reused.
// This should match enum IntelGpuGeneration in
//  \tools\metrics\histograms\metadata\gpu\enums.xml
enum class IntelGpuGeneration {};

enum class HasDiscreteGpu {};

struct GPU_EXPORT DevicePerfInfo {};

// Thread-safe getter and setter of global instance of DevicePerfInfo.
GPU_EXPORT std::optional<DevicePerfInfo> GetDevicePerfInfo();
GPU_EXPORT void SetDevicePerfInfo(const DevicePerfInfo& device_perf_info);

}  // namespace gpu

#endif  // GPU_CONFIG_DEVICE_PERF_INFO_H_