Commit Graph

113 Commits

Author SHA1 Message Date
Simon Ser ca45f4490c Remove all wayland-server.h includes
The documentation for wayland-server.h says:

> Use of this header file is discouraged. Prefer including
> wayland-server-core.h instead, which does not include the server protocol
> header and as such only defines the library PI, excluding the deprecated API
> below.

Replacing wayland-server.h with wayland-server-core.h allows us to drop the
WL_HIDE_DEPRECATED declaration.
2019-07-27 15:49:32 -04:00
Simon Ser 76ef089f52 output: drop wlr_output_mode.flags
AFAIK this was always set to zero. Instead, compute wl_output mode flags on the
fly.

Technically this is a breaking change, but I don't think anybody uses this
field.
2019-07-21 12:33:32 -04:00
Simon Ser 6c659da98b output: introduce wlr_output_lock_attach_render
This allows screen shooters and screen grabbers to ensure rendering will be
used instead of direct scan-out.
2019-06-07 09:06:11 -04:00
Simon Ser afe7b207d5 output: fix attach_buffer semantics 2019-06-07 09:06:11 -04:00
Simon Ser 1d222309b8 output: change set_dmabuf to attach_buffer 2019-06-07 09:06:11 -04:00
emersion 96d6fde5dc backend/drm: add basic support for direct scan-out 2019-06-07 09:06:11 -04:00
Simon Ser bde5a1f4ea output: introduce wlr_output_schedule_done
This commit introduces wlr_output_schedule_done and refactors the mechanism
used to send wl_output events to clients.

wlr_output_schedule_done schedules a wl_output.done event. This allows clients
to see wlr_output property changes as atomic.

This function is also useful for add-on interfaces like xdg_output which need
to trigger a wl_output.done event to apply their new state.
2019-04-27 10:02:21 -06:00
Simon Ser 1dbece74fb output: disambiguate the two types of damage
See https://github.com/swaywm/wlroots/issues/1665
2019-04-26 10:08:08 -06:00
Simon Ser 20690346c7 output: rename needs_commit to needs_frame
This new name makes more sense, since it is a request from the backend to get
a new frame. In the future a commit may not convey a new frame.
2019-04-23 14:34:30 -06:00
Simon Ser 5e6766a165 output-damage: refactor API
wlr_output_damage_make_current has been renamed to
wlr_output_damage_attach_render, since it's just a wrapper for
wlr_output_attach_render.

wlr_output_damage_swap_buffers has been removed completely. Instead,
wlr_output_damage now listens to successful wlr_output commits and updates its
internal state accordingly.
2019-04-23 14:34:30 -06:00
Simon Ser 31dcecbfa9 output: rename swap_buffers event to precommit
Also remove damage from the event data since it's no longer tied to commits.
2019-04-23 14:34:30 -06:00
Simon Ser 9a0f8a194c output: refactor backend API
This updates the backend part of the output API. This is mostly renaming:
make_current becomes attach_render and swap_buffers becomes commit.

This also fixes the RDP backend to support NULL damage.
2019-04-23 14:34:30 -06:00
Simon Ser 23e37e7b1d output: refactor frame submission API
This is necessary for direct scan-out and other upcoming features. This patch
changes the output API to look like the wl_surface API.

Outputs now have some double-buffered state: the frame to be submitted
(currently only wlr_renderer frames are supported) and the damaged region.
To attach a pending frame, use wlr_output_attach_render. To set the pending
damaged region, use wlr_output_set_damage.

To submit the pending state, call wlr_output_commit. This will submit the
pending frame to the backend.

To migrate from the old API to the new one:

- Replace wlr_output_make_current calls by wlr_output_attach_render
- Replace wlr_output_swap_buffers calls by wlr_output_set_damage and
  wlr_output_commit
2019-04-23 14:34:30 -06:00
Simon Ser 8acbf449cc output: introduce wlr_output_preferred_mode 2019-04-22 11:15:38 -06:00
emersion 1515c56cae output: remove lx, ly
Fixes https://github.com/swaywm/wlroots/issues/1610
2019-04-13 08:31:30 -06:00
Guido Günther cd60f40bbb wlr_output: Add preferred property (#1625)
* wlr_output: Indicate modes link

* wlr_output: Introduce preferred flag

This indicates an outputs preferred mode.

* drm: Set preferred flag for an outputs preferred mode
2019-03-21 22:12:43 +02:00
Geoff Greer 5c8d2da0a1 Add a wlr_output_set_subpixel()
drmModeConnector.subpixel doesn't seem to detect subpixel order on many displays (especially laptops). Allow subpixel order to be manually set.

The corresponding PR for sway adds a subpixel output option: https://github.com/swaywm/sway/pull/3645

Once both are merged, https://github.com/swaywm/sway/issues/3163 will be fixed.
2019-02-13 19:20:29 +01:00
emersion 6aaefad40d
output: switch swap_buffers damage to output-buffer-local coords
This is one more step towards [1]. This gives more freedom to the compositor
wrt. how it handles damage.

[1]: https://github.com/swaywm/wlroots/issues/1363
2018-12-01 10:56:35 +01:00
Ilia Bozhinov fb5691b6cc output: add wlr_output_preferred_read_format()
The read format is dependent on the output, so we first need to make it
current. This fixes a race condition in wlr-screencopy-v1 where a dmabuf
client would cause EGL_NO_SURFACE to be bound at the time when
screencopy needs to query for the preferred format, causing GL errors.
2018-11-24 10:54:25 +01:00
emersion ca770995cc
output: add wlr_output_render_software_cursors
Rendering in wlr_output_swap_buffers has unfortunate side-effects.
2018-11-13 16:55:33 +01:00
emersion 57307b7aa7
output: remove wlr_output_set_fullscreen_surface
This wasn't using direct scan-out. Direct scan-out will probably
work differently with @ascent12's work anyway.
2018-11-13 16:55:33 +01:00
emersion eac7c2ad2f output: add presentation refresh prediction 2018-10-04 22:00:24 +02:00
emersion 9203bfdd4f output: document signals 2018-10-04 21:56:38 +02:00
emersion 78389fe722 output: add present event 2018-10-04 21:56:38 +02:00
Aidan Epstein 0036161867 Update sizes for new EDID database. 2018-10-04 08:11:09 -07:00
emersion 2beb68007e output: make gamma size a size_t and gamma table const 2018-10-03 10:36:33 +02:00
emersion 928572c14d output: add wlr_output_set_hardware_cursors_enabled
And use it in screencopy.
2018-09-18 11:37:37 +02:00
emersion cb293f09e7 output: make wlr_output_enable return a bool 2018-09-14 18:18:07 +02:00
emersion 2ebecb6727 backend/drm: allow to pass empty gamma ramp to reset it 2018-08-02 23:33:59 +01:00
emersion e21563ec76 output: document gamma functions 2018-08-02 23:33:59 +01:00
emersion a149c2370a Implement wlr-gamma-control-unstable-v1 2018-08-02 23:33:04 +01:00
Drew DeVault 211ae764fd Initial pass on API stability guarantees
This introduces -DWLR_USE_UNSTABLE and adds information regarding the
stability status to all headers. I started with a conservative set of
headers to mark as stable:

- types/wlr_matrix.h
- util/edges.h
- util/log.h
- util/region.h
- xcursor.h
2018-07-29 19:20:34 -04:00
emersion 5dbf0fe7f2 linux-dmabuf: add v1 suffix
This prevents some future conflicts with the stable version.

Fixes #1133
2018-07-19 21:50:05 +01:00
emersion deeca53e33
Rename wl_resources to resource, wl_global to global 2018-07-08 19:21:31 +01:00
emersion 21928cbe61
Merge branch 'master' into screencontent 2018-05-31 12:33:27 +01:00
emersion e26f4dff98
export-dmabuf: wait for the frame to be ready, send timestamp 2018-05-29 18:47:17 +01:00
emersion 9e26808c28
output, backend/drm: add wlr_output_export_dmabuf 2018-05-29 18:45:45 +01:00
Dominique Martinet 555206cf60 Fix gcc string truncation warnings 2018-04-13 14:37:53 +09:00
emersion 9b440edaf4
output: document wlr_output_set_custom_mode 2018-04-03 23:05:49 -04:00
emersion 824a95ad19
matrix: use 2D matrices 2018-03-15 15:33:58 +01:00
emersion 392d54a35d
Wrap wl_resource_get_user_data into safer helper functions
This ensures we're not incorrectly casting a resource.

Fixes #628
2018-02-13 23:48:46 +01:00
emersion c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
emersion 5a8f098eea
output, output_damage: add docs 2018-02-11 13:04:00 +01:00
emersion faa57341ca
output: replace raw GL calls by wlr_renderer_* calls 2018-02-03 10:01:42 +01:00
emersion 3d3ea32137
Merge remote-tracking branch 'upstream/master' into output-damage 2018-02-03 00:15:44 +01:00
emersion 8eed857292
output: add destroy signal for wlr_output_cursor 2018-02-01 12:08:35 +01:00
emersion edb4c8d858
output: damage whole output when fullscreen surface size changes 2018-01-30 22:06:10 +01:00
emersion 704130cc11
output: fix performance issues with wlr_output_schedule_frame 2018-01-30 14:45:02 +01:00
emersion d498855b9d
backend/drm: fix hw cursor position on rotated and scaled outputs
output: add wlr_output_transformed_resolution
2018-01-30 10:23:35 +01:00
emersion 8d58ed502b
output: add wlr_output_schedule_frame 2018-01-26 22:39:23 +01:00