/** * Base class of a simple GPU profiler. * * @ignore */ export class GpuProfiler { /** * Profiling slots allocated for the current frame, storing the names of the slots. * * @type {string[]} * @ignore */ frameAllocations: string[]; /** * Map of past frame allocations, indexed by renderVersion * * @type {Map} * @ignore */ pastFrameAllocations: Map; /** * The if enabled in the current frame. * @ignore */ _enabled: boolean; /** * The enable request for the next frame. * @ignore */ _enableRequest: boolean; /** * The time it took to render the last frame on GPU, or 0 if the profiler is not enabled * @ignore */ _frameTime: number; loseContext(): void; /** * True to enable the profiler. * * @type {boolean} */ set enabled(value: boolean); get enabled(): boolean; processEnableRequest(): void; request(renderVersion: any): void; report(renderVersion: any, timings: any): void; /** * Allocate a slot for GPU timing during the frame. This slot is valid only for the current * frame. This allows multiple timers to be used during the frame, each with a unique name. * @param {string} name - The name of the slot. * @returns {number} The assigned slot index. * @ignore */ getSlot(name: string): number; /** * Number of slots allocated during the frame. * * @ignore */ get slotCount(): number; }