// Part of JoeyLib, Copyright (c) 2026 Scott Duensing, under the MIT License. // See LICENSE.md for license information. // SPDX-License-Identifier: MIT // // Stage present. // // jlStagePresent flips the library-owned stage (back-buffer) to the // display. Where the stage already has the display's layout it is a // copy (the IIgs's 4bpp pixels; the planes of the Amiga, ST, and // X68000); DOS, DVX, and the hosted ports expand each 4-bit pixel to // their display's 8-bit or RGB pixels. Drawing primitives mark per-row // dirty ranges on the stage as a side effect, so jlStagePresent only // touches rows that actually changed since the last present. Palette and // SCB changes reach the display at the present too. #ifndef JOEYLIB_PRESENT_H #define JOEYLIB_PRESENT_H #include "platform.h" #include "surface.h" #include "types.h" // Flip the dirty regions of the stage to the display, then clear the // dirty state. Drawing primitives mark dirty as a side effect, so // callers only need to call jlStagePresent at the end of a frame -- // everything they drew shows up. Rows that nothing touched since the // last present are skipped by the per-port present using the per-row // dirty bands. Every public call that writes the stage's pixels marks // them; the API has no other way to write them, and no call to mark // rows by hand. void jlStagePresent(void); #endif