-
Notifications
You must be signed in to change notification settings - Fork 32
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
base: master
Are you sure you want to change the base?
Conversation
Typo in the commit message: s/invalidated/invalidation/ |
ab49f94
to
23f6dbe
Compare
output->surface_invalidation.serial); | ||
output->committed_width = 0; | ||
output->committed_height = 0; | ||
output->committed_scale = 0; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
.
No description provided.