using System;
namespace UnityEngine.AdaptivePerformance
{
///
/// The device performance control interface handles all control elements related to the device performance. You can
/// change the settings or retrieve information about the and .
///
public interface IDevicePerformanceControl
{
///
/// When set to true, which is the default value, Adaptive Performance automatically sets and .
///
/// True when Adaptive Performance controls and , otherwise false. The default value is true.
bool AutomaticPerformanceControl { get; set; }
///
/// The current PerformanceControlMode.
/// PerformanceControlMode is affected by .
///
/// The current PerformanceControlMode
PerformanceControlMode PerformanceControlMode { get; }
///
/// The maximum valid CPU performance level you use with .
/// The minimum value returned is .
/// This value does not change after startup is complete.
///
int MaxCpuPerformanceLevel { get; }
///
/// The maximum valid GPU performance level you use with .
/// The minimum value returned is .
/// This value does not change after startup is complete.
///
int MaxGpuPerformanceLevel { get; }
///
/// The requested CPU performance level.
/// Higher levels typically allow CPU cores to run at higher clock speeds.
/// The consequence is that thermal warnings and throttling might happen sooner when the device cannot sustain high clock speeds.
/// Changes are applied once per frame.
/// It is recommended to set the CpuLevel as low as possible to save power.
/// The valid value range is [, ].
///
/// The requested CPU performance level
int CpuLevel { get; set; }
///
/// The requested GPU performance level.
/// Higher levels typically allow the GPU to run at higher clock speeds.
/// The consequence is that thermal warnings and throttling might happen sooner when the device cannot sustain high clock speeds.
/// Changes are applied once per frame.
/// It is recommended to set the GpuLevel as low as possible to save power.
/// The valid value range is [, ].
///
/// The requested GPU performance level
int GpuLevel { get; set; }
///
/// The requested CPU boost mode state.
/// Enabled typically allows CPU cores to run at higher clock speeds.
/// The consequence is that thermal warnings and throttling might happen sooner when the device cannot sustain high clock speeds.
/// Changes are applied once per frame.
/// It is recommended to not use a boost often and certainly not continuously to save power.
///
/// True when CPU boost is active, otherwise false. The default value is false.
bool CpuPerformanceBoost { get; set; }
///
/// The requested GPU boost mode state.
/// Enabled typically allows GPU cores to run at higher clock speeds.
/// The consequence is that thermal warnings and throttling might happen sooner when the device cannot sustain high clock speeds.
/// Changes are applied once per frame.
/// It is recommended to not use a boost often and certainly not continuously to save power.
///
/// True when CPU boost is active, otherwise false. The default value is false.
bool GpuPerformanceBoost { get; set; }
}
///
/// Enum used to describe the performance control mode used by Adaptive Performance. Can be read from .
///
public enum PerformanceControlMode
{
///
/// Adaptive Performance controls performance levels automatically (default).
/// This mode is enabled by setting to true.
///
Automatic,
///
/// You can control performance levels via and .
/// This mode is enabled by setting to false.
///
Manual,
///
/// The operating system controls performance levels.
/// This happens if manual control is not supported or if the system is in a thermal throttling state, at which point the operating system takes over control automatically.
///
System
}
}