/**
 * 3D-context projection for drawElementImage fast capture.
 *
 * drawElementImage cannot paint CSS 3D rendering contexts: backface-visibility
 * is ignored (flip cards capture their mirrored backface, even at rest),
 * siblings of the context drop out of the capture, and the context's
 * background is lost (standalone repro: spikes/de-3d-probe.mjs; Chrome
 * 148–151). There is no capture-side workaround — layoutsubtree children
 * never paint to screen, so CDP screenshots are blind during fast capture,
 * and drawElementImage only accepts immediate canvas children.
 *
 * Instead the composition is rewritten in-page before capture starts:
 * each 3D context (a `perspective` container, or a bare `preserve-3d`
 * subtree) is replaced by a WebGL canvas that projects the context's leaf
 * quads with the same math Blink's compositor uses. Leaf content is
 * rasterized once via SVG foreignObject (fonts and images inlined as data
 * URLs — SVG-as-image loads no external resources), uploaded as textures,
 * and re-projected every frame from the live computed `transform` matrices,
 * so GSAP keeps driving the (hidden) original elements and the projection
 * follows. Backface-visibility maps to GL face culling.
 *
 * The inserted canvases are picked up by instrumentAcceleratedCanvases
 * (preserveDrawingBuffer forced) and composited under the DOM paint by
 * captureDrawElementFrame — zero new capture-path code.
 *
 * Fidelity (spikes/de-3d-webgl-probe.mjs, flip card vs Blink 3D):
 * 74–77 dB at rest, 46–58 dB mid-flip — edge-AA differences only.
 *
 * v1 limitations (documented, fall back to the 3D gate when hit):
 *  - layout offsets inside a context are measured once at init; contexts
 *    whose layout (not transform) animates will drift.
 *  - background-image inlining covers <img> and computed background-image
 *    url(...) values; other external references rasterize empty.
 */
import type { Page } from "puppeteer-core";
export interface ThreeDProjectionResult {
    ok: boolean;
    groups: number;
    quads: number;
    /** standalone 3D-tweened elements projected as single quads */
    selfQuads?: number;
    /** raw tween-target entries reported by the producer stub */
    stubTargets?: number;
    reason?: string;
}
/**
 * Run inside the page (page.evaluate) after page-ready and BEFORE
 * injectDrawElementCanvas. Self-contained: no outer-scope references.
 */
export declare function initThreeDProjectionInPage(): Promise<ThreeDProjectionResult>;
/**
 * Initialize 3D projection on a fast-capture page. Returns the in-page
 * result; on failure the caller should fall back to the baseline route
 * (same contract as the video gate).
 */
export declare function initThreeDProjection(page: Page): Promise<ThreeDProjectionResult>;
/**
 * Detect CSS effects that drawElementImage cannot reproduce faithfully, so the
 * comp can fall back to screenshot capture instead of rendering damaged frames.
 *
 *  - `backdrop-filter` (blur/etc.) samples the pixels BEHIND the element from
 *    the compositor backdrop. drawElementImage captures the element subtree in
 *    isolation with no backdrop, so the filtered region is wrong (measured
 *    18–49 dB across the community eval). Fundamental single-element-capture
 *    limit, not a tunable bug.
 *  - `filter: blur()` / `filter: drop-shadow()` render differently through the
 *    paint-record path than the full compositor (Chromium inconsistency,
 *    drop-shadow-on-SVG especially; ~29 dB).
 *  - A WebGL context (custom GLSL shader, animated via GSAP uniforms with no
 *    rAF) freezes under seek-based capture: the accel-canvas drawImage
 *    composite captures whatever the GL last drew, which never advances per
 *    seek (~19 dB). The composite reliably handles 2d canvases (sentinel-paint
 *    refresh) but not GL that only redraws on its own loop — so any WebGL
 *    context is treated as a fallback signal here.
 *
 * Scans computed styles under the composition root + the accel-canvas registry.
 * Returns the first matched effect name (for logging) or null.
 */
export declare function detectCssEffectRisk(page: Page): Promise<string | null>;
//# sourceMappingURL=threeDProjection.d.ts.map