drmkit-present 0.1.2

The present spine for drmkit: scanout slot pools, damage accumulation, and frame pacing.
Documentation
// SPDX-FileCopyrightText: (c) 2026 Joel Winarske
// SPDX-License-Identifier: MIT

//! The present spine: getting rendered frames onto a display, repeatedly.
//!
//! Port of `src/present/` from drm-cxx @ `4a0b64a`, less the GL and Vulkan
//! producers.
//!
//! Where [`drmkit_scene`](https://docs.rs/drmkit-scene) answers "what goes on
//! which plane this frame", this crate answers the questions around it: which
//! buffer to draw into, how much of it needs redrawing, and whether the frame
//! is worth submitting at all.
//!
//! # Why it is a separate crate
//!
//! A producer that renders on the GPU needs EGL or Vulkan; one that writes
//! pixels with the CPU needs neither. Keeping the spine core-only means a
//! GPU-less build — a kiosk, a test rig, an instrument panel — links no
//! graphics stack at all. The device-facing half sits behind the `device`
//! feature, and the GBM producer behind `gbm`, which opens libgbm.
//!
//! # Not here yet
//!
//! The GL and Vulkan producers. They will live in their own crates and load
//! their libraries at runtime, plugging into `ScanoutBackend` through the
//! `ScanoutProducer` trait the way the GBM producer does.

#[cfg(feature = "device")]
mod armed_flip;
#[cfg(feature = "device")]
mod backend;
mod buffer_ring;
#[cfg(feature = "device")]
mod dumb_ring;
#[cfg(feature = "device")]
mod dumb_sink;
mod frame_economy;
#[cfg(feature = "gbm")]
mod gbm_producer;
mod negotiate;
#[cfg(feature = "device")]
mod producer;
#[cfg(feature = "device")]
mod scanout_format;

#[cfg(feature = "device")]
pub use backend::{Config as BackendConfig, RestorePolicy, ScanoutBackend, VrrPolicy};
pub use buffer_ring::{BufferRing, Lease, Rect, Repaint};
#[cfg(feature = "device")]
pub use dumb_ring::{DumbRingSource, PaintError};
#[cfg(feature = "device")]
pub use dumb_sink::{Config, DumbScanoutSink, PresentError};
pub use frame_economy::{FrameAction, FrameEconomy};
#[cfg(feature = "gbm")]
pub use gbm_producer::GbmScanoutProducer;
pub use negotiate::{negotiate, negotiate_for_format};
#[cfg(feature = "device")]
pub use producer::{ProducerError, ScanoutProducer};
#[cfg(feature = "device")]
pub use scanout_format::{DEFAULT_PREFERENCE, negotiate_scanout_format};

#[cfg(test)]
mod tests;