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

Implement surface-invalidation-v1 #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Nefsen402
Copy link
Member

No description provided.

@emersion
Copy link
Member

emersion commented Dec 5, 2022

Typo in the commit message: s/invalidated/invalidation/

main.c Outdated Show resolved Hide resolved
main.c Outdated Show resolved Hide resolved
@Nefsen402 Nefsen402 changed the title Implement surface-invalidated-v1 Implement surface-invalidation-v1 Dec 5, 2022
output->surface_invalidation.serial);
output->committed_width = 0;
output->committed_height = 0;
output->committed_scale = 0;
Copy link
Member

Choose a reason for hiding this comment

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

Hm, why do we need to reset these?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, to trigger the buffer_change bool below?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can add || output->surface_invalidation.needs_ack to the buffer_change condition?

Copy link
Member Author

Choose a reason for hiding this comment

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

In the render loop, it will compare the old committed_state with whatever it wants to render now, If the results are the same it will simply commit and return early. This is not good enough: we need to make sure that the render_frame function goes all the way through to create a buffer and commit. Just flipping the buffer_change isn't good enough, took me a while to debug that.

if (output->surface_invalidation.needs_ack) {
output->surface_invalidation.needs_ack = false;
wp_surface_invalidation_v1_ack(output->surface_invalidation.object,
output->surface_invalidation.serial);
Copy link
Member

Choose a reason for hiding this comment

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

Would be a bit nicer to move this to render_frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants