Skip to content
Snippets Groups Projects

gtk4: Improve handling of RGBA GL textures in GTK

Merged Sebastian Dröge requested to merge slomo/gst-plugins-rs:gtk4-no-render-pink into main

GTK 4.14 comes with a new GL renderer that does not support GL shader nodes anymore, so the conversion from non-premultiplied alpha to premultiplied alpha has to happen differently.

For GTK 4.14 or newer we use the correct format directly when building the texture, but only if a GLES3+ context is used. In that case the NGL renderer is used by GTK, which supports non-premultiplied formats correctly and fast.

For GTK 4.10-4.12, or 4.14 and newer if a GLES2 context is used, we use a self-mask to pre-multiply the alpha.

For GTK before 4.10, we use a GL shader and hope that it works.

Fixes #488 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Sebastian Dröge added 3 commits

    added 3 commits

    • d2d2fd85 - gtk4: Improve handling of RGBA GL textures in GTK
    • a5e6a1ad - gtk4: Always draw a black background behind the video frame
    • 67e1ccb4 - gtk4: Add property to the paintable for selecting the background color

    Compare with previous version

  • Sebastian Dröge resolved all threads

    resolved all threads

  • added 3 commits

    • c20a8a08 - gtk4: Improve handling of RGBA GL textures in GTK
    • 1f3a7bf1 - gtk4: Always draw a black background behind the video frame
    • 98a27112 - gtk4: Add property to the paintable for selecting the background color

    Compare with previous version

  • assigned to @slomo and unassigned @gstreamer-merge-bot

  • Sebastian Dröge added 14 commits

    added 14 commits

    • 98a27112...09e9c047 - 10 commits from branch gstreamer:main
    • 4183bc6f - gtk4: Improve handling of RGBA GL textures in GTK
    • acd642a7 - gtk4: Always draw a black background behind the video frame
    • 150925b9 - gtk4: Add property to the paintable for selecting the background color
    • e266bbcf - ci: Ignore GTK4 plugin when building with `--all-features`

    Compare with previous version

  • Sebastian Dröge resolved all threads

    resolved all threads

  • assigned to @gstreamer-merge-bot and unassigned @slomo

  • added 4 commits

    • 80355011 - gtk4: Improve handling of RGBA GL textures in GTK
    • 9971f71e - gtk4: Always draw a black background behind the video frame
    • 0fe4e0bf - gtk4: Add property to the paintable for selecting the background color
    • 76b9836e - ci: Ignore GTK4 plugin when building with `--all-features`

    Compare with previous version

  • assigned to @slomo and unassigned @gstreamer-merge-bot

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading