import { mat4 } from 'gl-matrix';
import SourceCache from '../source/source_cache';
import SegmentVector from '../data/segment';
import ProgramConfiguration from '../data/program_configuration';
import CrossTileSymbolIndex from '../symbol/cross_tile_symbol_index';
import Program from './program';
import Context from '../gl/context';
import DepthMode from '../gl/depth_mode';
import StencilMode from '../gl/stencil_mode';
import ColorMode from '../gl/color_mode';
import Texture from './texture';
import type Transform from '../geo/transform';
import type Tile from '../source/tile';
import type { OverscaledTileID } from '../source/tile_id';
import type Style from '../style/style';
import type StyleLayer from '../style/style_layer';
import type { CrossFaded } from '../style/properties';
import type LineAtlas from './line_atlas';
import type ImageManager from './image_manager';
import type GlyphManager from './glyph_manager';
import type VertexBuffer from '../gl/vertex_buffer';
import type IndexBuffer from '../gl/index_buffer';
import type { DepthRangeType, DepthMaskType, DepthFuncType } from '../gl/types';
import type ResolvedImage from '../style-spec/expression/types/resolved_image';
export declare type RenderPass = 'offscreen' | 'opaque' | 'translucent';
declare type PainterOptions = {
    showOverdrawInspector: boolean;
    showTileBoundaries: boolean;
    showPadding: boolean;
    rotating: boolean;
    zooming: boolean;
    moving: boolean;
    gpuTiming: boolean;
    fadeDuration: number;
};
/**
 * Initialize a new painter object.
 *
 * @param {Canvas} gl an experimental-webgl drawing context
 * @private
 */
declare class Painter {
    context: Context;
    transform: Transform;
    _tileTextures: {
        [_: number]: Array<Texture>;
    };
    numSublayers: number;
    depthEpsilon: number;
    emptyProgramConfiguration: ProgramConfiguration;
    width: number;
    height: number;
    tileExtentBuffer: VertexBuffer;
    tileExtentSegments: SegmentVector;
    debugBuffer: VertexBuffer;
    debugSegments: SegmentVector;
    rasterBoundsBuffer: VertexBuffer;
    rasterBoundsSegments: SegmentVector;
    viewportBuffer: VertexBuffer;
    viewportSegments: SegmentVector;
    quadTriangleIndexBuffer: IndexBuffer;
    tileBorderIndexBuffer: IndexBuffer;
    _tileClippingMaskIDs: {
        [_: string]: number;
    };
    stencilClearMode: StencilMode;
    style: Style;
    options: PainterOptions;
    lineAtlas: LineAtlas;
    imageManager: ImageManager;
    glyphManager: GlyphManager;
    depthRangeFor3D: DepthRangeType;
    opaquePassCutoff: number;
    renderPass: RenderPass;
    currentLayer: number;
    currentStencilSource: string | undefined | null;
    nextStencilID: number;
    id: string;
    _showOverdrawInspector: boolean;
    cache: {
        [_: string]: Program<any>;
    };
    crossTileSymbolIndex: CrossTileSymbolIndex;
    symbolFadeChange: number;
    gpuTimers: {
        [_: string]: any;
    };
    emptyTexture: Texture;
    debugOverlayTexture: Texture;
    debugOverlayCanvas: HTMLCanvasElement;
    constructor(gl: WebGLRenderingContext, transform: Transform);
    resize(width: number, height: number): void;
    setup(): void;
    clearStencil(): void;
    _renderTileClippingMasks(layer: StyleLayer, tileIDs: Array<OverscaledTileID>): void;
    stencilModeFor3D(): StencilMode;
    stencilModeForClipping(tileID: OverscaledTileID): StencilMode;
    stencilConfigForOverlap(tileIDs: Array<OverscaledTileID>): [
        {
            [_: number]: Readonly<StencilMode>;
        },
        Array<OverscaledTileID>
    ];
    colorModeForRenderPass(): Readonly<ColorMode>;
    depthModeForSublayer(n: number, mask: DepthMaskType, func?: DepthFuncType | null): Readonly<DepthMode>;
    opaquePassEnabledForLayer(): boolean;
    render(style: Style, options: PainterOptions): void;
    renderLayer(painter: Painter, sourceCache: SourceCache, layer: StyleLayer, coords: Array<OverscaledTileID>): void;
    gpuTimingStart(layer: StyleLayer): void;
    gpuTimingEnd(): void;
    collectGpuTimers(): {
        [_: string]: any;
    };
    queryGpuTimers(gpuTimers: {
        [_: string]: any;
    }): {};
    /**
     * Transform a matrix to incorporate the *-translate and *-translate-anchor properties into it.
     * @param inViewportPixelUnitsUnits True when the units accepted by the matrix are in viewport pixels instead of tile units.
     * @returns {mat4} matrix
     * @private
     */
    translatePosMatrix(matrix: mat4, tile: Tile, translate: [number, number], translateAnchor: 'map' | 'viewport', inViewportPixelUnitsUnits?: boolean): mat4;
    saveTileTexture(texture: Texture): void;
    getTileTexture(size: number): Texture;
    /**
     * Checks whether a pattern image is needed, and if it is, whether it is not loaded.
     *
     * @returns true if a needed image is missing and rendering needs to be skipped.
     * @private
     */
    isPatternMissing(image?: CrossFaded<ResolvedImage> | null): boolean;
    useProgram(name: string, programConfiguration?: ProgramConfiguration | null): Program<any>;
    setCustomLayerDefaults(): void;
    setBaseState(): void;
    initDebugOverlayCanvas(): void;
    destroy(): void;
}
export default Painter;
//# sourceMappingURL=painter.d.ts.map