Content-Length: 290787 | pFad | http://github.com/slint-ui/slint/pull/7794

DE Fix TargetPixelBuffer functions being called with regions not clipped… by tronical · Pull Request #7794 · slint-ui/slint · GitHub
Skip to content
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

Fix TargetPixelBuffer functions being called with regions not clipped… #7794

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tronical
Copy link
Member

@tronical tronical commented Mar 4, 2025

… against the dirty region

This got lost in the rebase/squash session of #7685

… against the dirty region

This got lost in the rebase/squash session of #7685
@tronical tronical requested a review from ogoffart March 4, 2025 13:31
Comment on lines 1185 to 1188
geometry.origen.x,
geometry.origen.y,
geometry.size.width,
geometry.size.height,
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be the region, not the full geometry

Copy link
Member

Choose a reason for hiding this comment

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

You also need to adjust the source_offset_x/y

Copy link
Member Author

Choose a reason for hiding this comment

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

Argh, thanks.

You also need to adjust the source_offset_x/y

How does it need to be adjusted?

Copy link
Member

Choose a reason for hiding this comment

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

Depends on how you want the draw_texture function to work. But the implementation needs to know what pixel of the image goes where.
So if you want the function to work the same as our current draw_function, you can increment the source_offset by the difference between the geometry origen and the region origen. I think that would work. the extra clip thing may also help.

@ogoffart ogoffart self-requested a review March 4, 2025 14:19
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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/slint-ui/slint/pull/7794

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy