import { BufferDescriptor, BufferId, GpuBackend, GpuBackendInfo, GpuViewport, Texture1DDescriptor, TextureId } from '../../types'; import { DrawList } from '../../drawList'; import { FrameUniforms } from '../../frame'; export interface WebGPUBackendOptions { powerPreference?: "low-power" | "high-performance"; preferredFormat?: string; } export declare class WebGPUBackend implements GpuBackend { readonly info: GpuBackendInfo; private canvas; private opts; private viewport; private adapter; private device; private context; private format; private buffers; private textures; private trianglePipeline; private linePipeline; private pointPipeline; private bandPipeline; private heatmapPipeline; private heatmapBindGroups; constructor(canvas: HTMLCanvasElement, opts?: WebGPUBackendOptions); static isSupported(): boolean; init(): Promise; setViewport(viewport: GpuViewport): void; createOrUpdateBuffer(id: BufferId, data: ArrayBufferView, desc?: Partial): void; deleteBuffer(id: BufferId): void; createOrUpdateTexture1D(id: TextureId, data: Uint8Array, desc?: Partial): void; deleteTexture(id: TextureId): void; /** * Initialize all pipelines lazily */ private ensurePipelines; render(drawList: DrawList, frame: FrameUniforms): void; /** * Render with explicit bounds (for integration with chart system) */ renderWithBounds(drawList: DrawList, frame: FrameUniforms, bounds: { xMin: number; xMax: number; yMin: number; yMax: number; }): void; /** * Render a single draw call */ private renderDrawCall; /** Triangle list with line-pipeline uniforms (xy vertices, uniform color). */ private renderSolidTriangles; private renderLine; private renderPoints; private renderBand; private renderHeatmap; destroy(): void; }