import { DeviceCapability } from './DeviceCapability'; import { THERMAL_PROFILE, ThermalTierConfig, ThermalTierId } from './thermal-profile.json'; /** Boot 读取:与 MemoryProfile 同 tier(DeviceCapability),驱动帧率与预载预算 */ export class ThermalProfile { private static _resolved = false; private static _config: ThermalTierConfig = THERMAL_PROFILE.tiers[THERMAL_PROFILE.defaultTier]; static resolve(): void { if (this._resolved) return; this._resolved = true; DeviceCapability.resolve(); const tier = DeviceCapability.memoryTier as ThermalTierId; this._config = THERMAL_PROFILE.tiers[tier] ?? THERMAL_PROFILE.tiers[THERMAL_PROFILE.defaultTier]; } static get current(): ThermalTierConfig { this.resolve(); return this._config; } }