Skip to content

Conversation

@happylinks
Copy link
Member

No description provided.

- Add library path setup for test execution using the same logic as gst-env.py
  to ensure tests can find required shared libraries (particularly on
  macos)
- Support cargo-nextest when available for better test output
- Split test execution per package for better granularity in meson test reports
- Add --build-tests flag to build test binaries during plugin compilation
- Fix logfile path generation when depfile is not provided

This ensures that Rust plugin tests run correctly with proper library paths
and provides better integration with the meson test infrastructure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2583>
Adds a "draw" signal that allows custom drawing operations on the
Skia canvas after reshape processing completes. The signal provides:
- BufferRef: Access to the buffer being processed
- VideoInfo: Video format information
- SkiaCanvas: Canvas for custom drawing operations
- SkiaContext: Optional GPU context for hardware acceleration

The signal is emitted after clipping rounded corners, so custom
drawing will be affected by the border-radius property.

Also fixes a bug where border radius clipping was incorrectly
applied even when border_radius = 0, which prevented custom drawing
from being visible.

Changes include:
- New GBoxed wrapper types for passing Rust types through GObject signals
- Signal definition with RUN_LAST flag for synchronous execution
- Updates to both CPU (reshape) and GL (reshapegl) implementations
- Comprehensive test coverage validating signal emission and drawing
- Re-export of boxed types at crate level for public API

This enables applications to perform custom Skia drawing without
requiring a separate gloverlay element in the pipeline.
We do not rely on any EGL specific API anymore
When skiareshape is used solely for custom drawing via the "draw" signal
without any geometric transformations (crop/padding/border-radius), we could
implement transform_ip to avoid unnecessary buffer copies. This would improve
performance for cases where only overlays are being drawn on top of the video.
Skia milestone 140 deprecated methods taking GrDirectContext* in favor
of methods taking SkRecorder*. This updates the skia plugin to use the
new Recorder-based API:

- Use DirectContext.as_recorder() to get a Recorder for validation and
  subsetting operations
- Image.is_valid() now takes Option<&mut dyn Recorder> instead of
  Option<&mut DirectContext>
- Image.make_subset() now takes Option<&mut dyn Recorder> instead of
  Option<&mut DirectContext>

The DirectContext is still used for actual GPU operations (creating
textures, surfaces, flushing), but validation and subsetting now use
the Recorder abstraction as part of Skia's transition to support both
Ganesh and Graphite backends.
@soutar soutar merged commit a576d6d into tla_main Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants