PlatformEffect

actual class PlatformEffect(source)

The Android form: a media3 Effect that runs as its own pass, or a TextureOverlay that the pipeline blends with the overlays next to it.

actual class PlatformEffect(source)

The Apple form: one step of a Core Image chain.

A step, not a bare CIFilter, so an effect can be a transform plus a composite, or a rect operation with no filter at all.

expect class PlatformEffect(source)

A platform's own realization of one EffectSpec, opaque to common code.

Produced by an EffectResolver and consumed by whichever backend is rendering. Never implemented by a consumer, and never shared between two pipelines.

actual class PlatformEffect(source)

The JVM form: a fragment of a filter graph.

The platform object here is data rather than a GPU handle, so a resolver is a pure function from a spec to a value and can be asserted on in a unit test with no toolchain installed. How a fragment is spelled on a command line belongs to the backend that runs it, not here.

actual class PlatformEffect(source)

The browser form: a declaration of one render pass, not a compiled program.

A WebGL program needs a live context, costs milliseconds to link and cannot be shared between contexts, so a resolver cannot hand back a realised program the way the Android and Apple ones do. It hands back what to draw instead, and the pipeline compiles and caches by WebGlPass.programKey. Media3 splits GlEffect from toGlShaderProgram for the same reason.

Constructors

Link copied to clipboard
constructor(effect: Effect)

Wraps an effect that runs as its own pass over the frame.

constructor(newOverlay: () -> TextureOverlay)

Wraps an overlay, which the pipeline gathers with the overlays next to it into one blend.

constructor(step: CoreImageEffect)
constructor(filter: CIFilter)

Wraps a single CIFilter, applied by setting the image on inputImage.

constructor(fragment: FilterFragment)
constructor(pass: WebGlPass)

Properties

Link copied to clipboard

What this effect contributes to the graph.

Link copied to clipboard

What this effect draws.

Link copied to clipboard

The transformation this effect applies.