/// <reference types="dist" />
import { ExtensionType } from '../../../../extensions/Extensions';
import { Matrix } from '../../../../maths/Matrix';
import { CLEAR } from '../../gl/const';
import { RenderTarget } from '../../shared/renderTarget/RenderTarget';
import { SystemRunner } from '../../shared/system/SystemRunner';
import { Texture } from '../../shared/texture/Texture';
import type { RgbaArray } from '../../../../color/Color';
import type { ICanvas } from '../../../../settings/adapter/ICanvas';
import type { CLEAR_OR_BOOL } from '../../gl/const';
import type { System } from '../../shared/system/System';
import type { BindableTexture } from '../../shared/texture/Texture';
import type { GPU } from '../GpuDeviceSystem';
import type { WebGPURenderer } from '../WebGPURenderer';
export type RenderSurface = ICanvas | BindableTexture | RenderTarget;
export declare class GpuRenderTargetSystem implements System {
    /** @ignore */
    static extension: {
        readonly type: readonly [ExtensionType.WebGPUSystem];
        readonly name: "renderTarget";
    };
    rootRenderTarget: RenderTarget;
    renderingToScreen: boolean;
    rootProjectionMatrix: Matrix;
    renderTarget: RenderTarget;
    onRenderTargetChange: SystemRunner;
    private readonly _renderSurfaceToRenderTargetHash;
    private _gpuRenderTargetHash;
    private readonly _renderTargetStack;
    private readonly _renderer;
    private readonly _defaultClearColor;
    private _gpu;
    constructor(renderer: WebGPURenderer);
    renderStart({ target, clear, clearColor, }: {
        target: RenderSurface;
        clear: CLEAR_OR_BOOL;
        clearColor: RgbaArray;
    }): void;
    protected contextChange(gpu: GPU): void;
    bind(renderSurface: RenderSurface, clear?: CLEAR_OR_BOOL, clearColor?: RgbaArray): RenderTarget;
    /**
     * returns the gpu texture for the first color texture in the render target
     * mainly used by the filter manager to get copy the texture for blending
     * @param renderTarget
     * @returns a gpu texture
     */
    private _getGpuColorTexture;
    getDescriptor(renderTarget: RenderTarget, clear: CLEAR_OR_BOOL, clearValue: RgbaArray): GPURenderPassDescriptor;
    clear(clear?: CLEAR_OR_BOOL, clearColor?: RgbaArray): void;
    push(renderSurface: RenderSurface, clear?: CLEAR | boolean, clearColor?: RgbaArray): RenderTarget;
    pop(): void;
    getRenderTarget(renderSurface: RenderSurface): RenderTarget;
    copyToTexture(sourceRenderSurfaceTexture: RenderTarget, destinationTexture: Texture, origin: {
        x: number;
        y: number;
    }, size: {
        width: number;
        height: number;
    }): Texture;
    restart(): void;
    destroy(): void;
    private _startRenderPass;
    private _initRenderTarget;
    private _getGpuRenderTarget;
    private _initGpuRenderTarget;
    private _resizeGpuRenderTarget;
}
