Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Comments

presentation-time: use a surface addon #3246

Merged
emersion merged 1 commit intoswaywm:masterfrom
vyivel:presentation-time-refactor
Oct 22, 2021
Merged

presentation-time: use a surface addon #3246
emersion merged 1 commit intoswaywm:masterfrom
vyivel:presentation-time-refactor

Conversation

@vyivel
Copy link
Member

@vyivel vyivel commented Oct 9, 2021

Preliminary work for #3151.


This PR introduces a surface-synced object which acts as an "owner" of presentation feedbacks, which allows switching to the usual current/pending pattern.

Notes

  • While there is no way to destroy wlr_presentation_surface without destroying the surface itself, it shouldn't be a problem as a surface which uses presentation feedbacks is likely to use them for its entire lifetime.
  • This has only been tested with weston-presentation-shm.

@vyivel vyivel force-pushed the presentation-time-refactor branch 2 times, most recently from 4d91d85 to b72f094 Compare October 15, 2021 13:39
@vyivel
Copy link
Member Author

vyivel commented Oct 15, 2021

Rebased against master.

Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

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

This is a very nice simplification and optimization! Apart from the presented flag, this LGTM.

@@ -31,27 +31,15 @@ struct wlr_presentation {

struct wlr_presentation_feedback {
struct wlr_presentation *presentation;
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated to this PR, but this field seems to be unused?

Copy link
Member Author

Choose a reason for hiding this comment

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

Other wlroots objects seem to have a pointer to the "main" object as well (e.g. wlr_layer_surface_v1 has a pointer to the corresponding wlr_layer_shell_v1). Maybe compositors could use it, idk.

Copy link
Member

Choose a reason for hiding this comment

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

Some other wlroots objects have it because they need it. I don't think it's useful for compositors.

Copy link
Member

Choose a reason for hiding this comment

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

(In any case, this is just a drive-by comment, not something that should be addressed in this PR.)

@vyivel vyivel force-pushed the presentation-time-refactor branch from b72f094 to f0f96c4 Compare October 22, 2021 09:43
Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

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

Thanks!

@emersion emersion enabled auto-merge (rebase) October 22, 2021 09:44
@emersion emersion merged commit 6c3a71d into swaywm:master Oct 22, 2021
@vyivel vyivel deleted the presentation-time-refactor branch October 22, 2021 09:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants