Add a test that verifies the sandbox SDL driver receives the correct
damage rectangle in its sync() method. The test:
- Clears the display and verifies full-screen damage is passed to sync()
- Writes text at a specific position and verifies smaller damage region
- Draws a box and verifies the damage matches the box dimensions
The damage rectangle is recorded in sandbox_sdl_plat.last_sync_damage
and can be retrieved using sandbox_sdl_get_sync_damage() for testing
purposes.
Series-to: concept
Series-cc: heinrich
Cover-letter:
video: Enhancements to support a pointer
The video subsystem has a video_sync() function which does quite a few
things and is rather hard to predict and control:
- it may or may not actually sync, depending on a timer, etc
- it may be called when U-Boot is idle, so any time delays can cause a
sync
These two problems make it hard to test.
This series introduces a deterministic video_manual_sync() which does
exactly what it is told, using a set of flags:
VIDSYNC_FORCE - the force flag was provided (info for the driver)
VIDSYNC_FLUSH - framebuffer changes should be flushed to hardware
VIDSYNC_COPY - the copy framebuffer (if any) should be updated
The video_sync() method is renamed to sync() and is passed the flags,
so that drivers can find out what to do. This allows the
sandbox-specific code in video_sync() to move to the driver.
These features will (later) be used by expo to provide a better user
experience, e.g. to sync only part of the display, or to sync quickly
when there is mouse movement.
The pointer also needs to be drawn with transparency which is not well
supported by the BMP code. This series adds support for a simple
transparency colour for now, although an alpha channel may be
appropriate in the future.
END
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Series-links: 1:45
Series-version: 2