This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 342
Conversation
This file contains 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
emersion
force-pushed
the
viewporter
branch
2 times, most recently
from
April 27, 2020 12:25
3c4f35e
to
44a04ad
Compare
zzag
reviewed
May 27, 2020
emersion
force-pushed
the
viewporter
branch
2 times, most recently
from
June 8, 2020 12:11
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
include/wlr/render/wlr_renderer.h
Outdated
@@ -32,6 +32,11 @@ struct wlr_renderer { | |||
} events; | |||
}; | |||
|
|||
struct wlr_texture_box { |
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.
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
emersion
changed the title
[WIP] Implement the viewporter protocol
Implement the viewporter protocol
Jun 8, 2020
This is now ready for review. |
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
Removed the "breaking" label, this isn't a breaking change. Update to use |
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.
Ping @ascent12 |
ascent12
approved these changes
Jun 17, 2020
Thanks! |
ddevault
pushed a commit
to swaywm/sway
that referenced
this pull request
Jun 17, 2020
Depends on [1]. [1]: swaywm/wlroots#2092
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 -s
weston-scaler -d
weston-scaler -b
Future 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_scale
maps directly to theCRTC_W
andCRTC_H
KMS properties.wlr_output_layer_set_buffer_src_box
maps directly to theSRC_*
KMS properties.Closes: #633
Breaking change: renderer implementations need to be updated,
render_texture_with_matrix
has been replaced withrender_subtexture_with_matrix
which allows specifying a source rectangle.