Skip to content

Improve texture builder APIs #2046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 17, 2025
Merged

Conversation

sdroege
Copy link
Member

@sdroege sdroege commented May 8, 2025

CC @rmader

@sdroege sdroege requested a review from bilelmoussaoui as a code owner May 8, 2025 12:00
@sdroege sdroege force-pushed the texture-builders branch from 8d228b7 to 7f00138 Compare May 8, 2025 12:03
@sdroege sdroege force-pushed the texture-builders branch from 7f00138 to 0d67b6f Compare May 13, 2025 08:42
@@ -75,7 +75,7 @@ jobs:
working-directory: /gtk
if: steps.cache.outputs.cache-hit != 'true'
run: |
meson setup builddir --prefix=C:/gnome -Dbackend_max_links=1 -Dbuild-demos=false -Dbuild-tests=false -Dvulkan=disabled -Dmedia-gstreamer=disabled -Dbuild-examples=false -Dglib:tests=false -Dharfbuzz:tests=disabled -Dharfbuzz:docs=disabled -Dgraphene:tests=false -Dgdk-pixbuf:tests=false -Dcairo:tests=disabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will probably break the msvc build but let us hope not

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's broken completely anyway 🙃

@sdroege sdroege force-pushed the texture-builders branch from c59cad6 to 6cf4077 Compare May 13, 2025 09:08
@bilelmoussaoui
Copy link
Member

Please rebase, that should fix the CI. We can merge afterwards

@sdroege sdroege force-pushed the texture-builders branch from 6cf4077 to 69df1f2 Compare May 17, 2025 08:23
@sdroege
Copy link
Member Author

sdroege commented May 17, 2025

Windows things still don't pass but rebased otherwise :)

@bilelmoussaoui
Copy link
Member

Windows things still don't pass but rebased otherwise :)

it does pass on main, it is caused by


Error:   --> gdk4\src\dmabuf_texture_builder.rs:53:53
   |
53 |     pub fn fd(&self, plane: u32) -> Option<std::os::fd::BorrowedFd<'_>> {
   |                                                     ^^ could not find `fd` in `os`

and other errors ;-)

@bilelmoussaoui
Copy link
Member

The whole DMABufTextureBuilder should be gated by cfg(linux) anyways

@sdroege
Copy link
Member Author

sdroege commented May 17, 2025

Oh indeed, sorry

@sdroege sdroege force-pushed the texture-builders branch from 66639fb to 229f252 Compare May 17, 2025 08:57
@sdroege
Copy link
Member Author

sdroege commented May 17, 2025

Needs gtk-rs/gir#1652

@sdroege sdroege force-pushed the texture-builders branch from 229f252 to bb5f6a3 Compare May 17, 2025 09:26
sdroege added 4 commits May 17, 2025 12:41
…nsafe

The fd must be valid for as long as the texture stays around, which
can't be statically guaranteed and is job of the user, e.g. by using the
release function.

And use Borrowed fd for getter.
@sdroege sdroege force-pushed the texture-builders branch from cdcf0ff to ffe6583 Compare May 17, 2025 09:41
@bilelmoussaoui bilelmoussaoui merged commit 7525aa6 into gtk-rs:main May 17, 2025
41 checks passed
@sdroege sdroege deleted the texture-builders branch May 17, 2025 10:45
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.

2 participants