@itwin/core-frontend
Version:
iTwin.js frontend components
33 lines • 1.31 kB
TypeScript
import { GLTimerResultCallback } from "../RenderSystemDebugControl";
import { System } from "./System";
/** Record GPU hardware queries to profile independent of CPU.
*
* This is a wrapper around EXT_disjoint_timer_query. The extension should be available in the following browsers:
* * Chrome 67 and later
* * Chromium-based Edge
* * Firefox (with webgl.enable-privileged-extensions set to true in about:config)
*
* EXT_disjoint_timer_query only supports one active query per context without nesting. This wrapper keeps an internal stack to make
* nesting work.
*
* The extension API makes timestamps look like a better solution than disjoint timers, but they are not actually supported.
* See https://bugs.chromium.org/p/chromium/issues/detail?id=595172
* @internal
*/
export declare class GLTimer {
private _extension;
private _queryStack;
private _resultsCallback?;
private constructor();
static create(system: System): GLTimer;
get isSupported(): boolean;
set resultsCallback(callback: GLTimerResultCallback | undefined);
beginOperation(label: string): void;
endOperation(): void;
beginFrame(): void;
endFrame(): void;
private cleanupAfterDisjointEvent;
private pushQuery;
private popQuery;
}
//# sourceMappingURL=GLTimer.d.ts.map