This repository was archived by the owner on Nov 1, 2021. It is now read-only.
Implement the viewporter protocol#2092
Merged
Merged
Conversation
3c4f35e to
44a04ad
Compare
zzag
reviewed
May 27, 2020
d638b89 to
9ffc06f
Compare
emersion
added a commit
to emersion/sway
that referenced
this pull request
Jun 8, 2020
Depends on [1]. [1]: swaywm/wlroots#2092
emersion
commented
Jun 8, 2020
| } events; | ||
| }; | ||
|
|
||
| struct wlr_texture_box { |
Member
Author
There was a problem hiding this comment.
This isn't a very good name. Maybe something like wlr_fbox would be better?
texcoord is a vector of coordinates, with the first member being the X axis value and the second member being the Y axis value. It makes more sense to use the accessors with the same names.
emersion
added a commit
to emersion/sway
that referenced
this pull request
Jun 8, 2020
Depends on [1]. [1]: swaywm/wlroots#2092
Member
Author
|
This is now ready for review. |
Contributor
|
On a first pass, this LGTM. Would like @ascent12's thoughts and pending some discussions in IRC. |
Same as wlr_box, but for floating-point numbers.
This renders only a subset of the texture, instead of the full texture.
This field contains the viewport source and destination parameters. It's intended to be updated by a third-party protocol, for instance viewporter.
emersion
added a commit
to emersion/sway
that referenced
this pull request
Jun 8, 2020
Depends on [1]. [1]: swaywm/wlroots#2092
Member
Author
|
Removed the "breaking" label, this isn't a breaking change. Update to use |
Member
Author
|
Ah, this is a breaking change for custom renderers. My bad. |
This helper allows compositors to retrieve the buffer source box in buffer-local coordinates.
Member
Author
|
Ping @ascent12 |
ascent12
approved these changes
Jun 17, 2020
Contributor
|
Thanks! |
ddevault
pushed a commit
to swaywm/sway
that referenced
this pull request
Jun 17, 2020
Depends on [1]. [1]: swaywm/wlroots#2092
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The viewporter protocol allows clients to ask the compositor to crop and scale buffers during composition. This allows clients to avoid having to crop and scale in an intermediary buffer. The use-cases are:
TODO:
Test plan:
weston-scaler -sweston-scaler -dweston-scaler -bFuture plans: wire this up with direct scan-out. With my wlr_output_layer proposal, I think we can extend the API to allow compositors to feed src/dst rectangles to the backend:
wlr_output_layer_scalemaps directly to theCRTC_WandCRTC_HKMS properties.wlr_output_layer_set_buffer_src_boxmaps directly to theSRC_*KMS properties.Closes: #633
Breaking change: renderer implementations need to be updated,
render_texture_with_matrixhas been replaced withrender_subtexture_with_matrixwhich allows specifying a source rectangle.