Commit Graph

258 Commits

Author SHA1 Message Date
emersion 57548b557a
Merge branch 'master' into screencontent 2018-06-17 14:49:18 +01:00
emersion 0378d143d9
surface: remove wlr_surface.texture
The texture is managed by the surface's wlr_buffer now. In
particular, the buffer can destroy the texture early if it becomes
invalid.
2018-06-13 19:38:10 +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
emersion e849a68e6e
output: correctly clear screen when fullscreened 2018-05-20 13:44:18 +01:00
emersion dbba1311b7
output: fix lingering hardware cursors 2018-05-15 18:13:26 +01:00
emersion 13098a18ea
Fix hardware cursors scale & transform 2018-05-09 19:58:18 +01:00
emersion caf9f9022c
Merge pull request #936 from emersion/full-hardware-cursors
output: always use hardware cursors if available
2018-05-04 19:00:45 +01:00
emersion 7843a48432
output: simplify and update code style 2018-05-03 18:46:17 +01:00
emersion 6b3eac37f1
output: assert move_cursor if set_cursor is available 2018-05-02 15:04:35 +01:00
emersion 225d182765
output: always use hardware cursors if available
This changes the `wlr_output_impl.set_cursor` function to take a
`wlr_texture` instead of a byte buffer. This simplifies the
DRM and Wayland backends since they were creating textures from
the byte buffer anyway.

With this commit, performance should be improved when moving the
cursor since outputs don't need to be re-rendered anymore.
2018-05-01 21:38:04 +01:00
emersion 625a7a48dc
Don't use the wlr_ prefix for static functions 2018-04-25 23:51:00 +01:00
emersion 94fa6c88f4
output: don't emit the mode event if it hasn't changed
This also fixes #535.
2018-04-18 00:15:25 +01:00
emersion 1b802d9251
Make wlr_renderer_scissor take normal coords instead of upside-down ones 2018-04-12 19:38:33 -04:00
emersion 31c8bdc277
Fix wlr_output_transform_compose 2018-04-12 19:05:05 -04:00
emersion c63d94483b
Redesign wlr_texture
- Textures are now immutable (apart from those created from raw
  pixels), no more invalid textures
- Move all wl_drm stuff in wlr_renderer
- Most of wlr_texture fields are now private
- Remove some duplicated DMA-BUF code in the DRM backend
- Add more assertions
- Stride is now always given as bytes rather than pixels
- Drop wl_shm functions

Fun fact: this patch has been written 10,000 meters up in the air.
2018-03-24 23:48:32 -04:00
emersion c41de2d1be
render: split render.h into wlr_renderer.h and wlr_texture.h 2018-03-19 23:16:29 +01:00
emersion 7894fca224
matrix: rename wlr_matrix_texture to wlr_matrix_projection 2018-03-15 21:26:45 +01:00
emersion 824a95ad19
matrix: use 2D matrices 2018-03-15 15:33:58 +01:00
emersion d26b67cb06
matrix: unify API, don't use array pointers 2018-03-15 11:10:56 +01:00
emersion b6a3f240c7
matrix: move to types/ 2018-03-15 09:11:27 +01:00
emersion 8e3d294d6a
output: fix trailing cursor at (0, 0) on startup 2018-03-11 11:21:40 +01:00
emersion a951fbb264
output: don't move hidden cursors
When using the DRM backend and multiple outputs, that reduces the
number of commits.
2018-03-07 10:22:39 +01:00
Drew DeVault 0820557c8c
Merge pull request #693 from emersion/fix-output-bind-multiple
Fix clients binding multiple times to the same output
2018-03-01 11:23:41 -05:00
emersion 90148e64ab
Fix clients binding multiple times to the same output 2018-03-01 10:19:48 +01:00
Guido Günther d08792bfff Add alpha to wlr_render_with_matrix
so we can use the alpha channel to e.g. blend in textures
2018-02-25 13:47:48 +01:00
Drew DeVault 1d9be89e2d
Revert "ELF Visibility" 2018-02-19 18:01:27 -05:00
Scott Anderson 86269052eb Explicitly export EFL symbols 2018-02-19 14:26:40 +13: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 36ead80cd1
Make wlr_signal_emit_safe private 2018-02-12 19:52:47 +01:00
emersion 10ecf871f2
Remove wlr_backend.events.{output_remove,device_remove} 2018-02-12 10:36:43 +01:00
emersion 5e58d46cc1
Add wlr_signal_emit_safe 2018-02-12 09:12:31 +01:00
emersion bf6d245400
Swap buffers with damage 2018-02-09 22:54:14 +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 a295c805c4
output: fix output_damage_whole for scaled outputs 2018-01-30 21:42:12 +01:00
emersion babdd6ccf7
backend: fix use-after-free when destroying backends
The backend destroy signal is emitted before the output_remove
signal is. When the destroy signal is emitted listeners remove
their output_remove listener, so the output_remove signal is never
received and listeners have an invalid output pointer.

The correct way to solve this would be to remove the output_remove
signal completely and use the wlr_output.events.destroy signal
instead. This isn't yet possible because wl_signal_emit is unsafe
and listeners cannot be removed in listeners.
2018-01-30 19:45:57 +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 2cc989e097
output: restrict provided damage to output bounds 2018-01-29 23:21:30 +01:00
emersion 7881d039b6
rootston: fix output_damage_whole
This should fix artifacts when leaving fullscreen on rotated outputs.
2018-01-28 21:58:02 +01:00
emersion 485aa87468
output: fix fullscreen on transformed outputs 2018-01-28 10:40:38 +01:00
emersion 7adf13e284
Fix flickering when switching VT 2018-01-27 11:16:42 +01:00
emersion 8d58ed502b
output: add wlr_output_schedule_frame 2018-01-26 22:39:23 +01:00
emersion ece2c1e4e2
Damage tracking for transformed outputs 2018-01-26 22:11:09 +01:00
emersion 6281deb90f
Merge remote-tracking branch 'upstream/master' into output-damage 2018-01-24 14:48:01 +01:00
Markus Ongyerth f946c10cb1 re-adds wlr_output_update_enabled
Re-add the wlr_output_update_enabled to make sure
wlr_output::events.enable is called when the output enabled state
changes.
2018-01-24 10:23:48 +01:00
Markus Ongyerth 3cf7225cec decouples outputenable state and wl_output global
This decouples wlr_output_enable and the wl_global.
The previously internal functions wlr_output_(destroy/create)_global are
exposed and used automatically in the wlr_output_layout to create/tear
down the global.
The compositor can handle them itself if it wants to, but I think this
is the right moment to create/destroy the wl_output when the
wlr_output_layout is used.
2018-01-23 17:40:12 +01:00
emersion 0365b587f0
output: add damage tracking via buffer age 2018-01-21 00:06:35 +01:00
emersion 4ca38b84ed
backend/drm: fix hardware cursors not moving
This adds back `wlr_output::needs_swap`. This allows a backend to
request buffer swaps even if the output isn't damaged. This is
needed by the DRM backend to trigger pageflips when the cursor
moves.
2018-01-20 16:43:14 +01:00
emersion e29a0df8c1
output: fix software cursors damage tracking 2018-01-19 14:08:47 +01:00
emersion a0f24b809e
output: add damage event 2018-01-19 13:13:46 +01:00
emersion 443bd4cd89
output: fullscreen surface damage tracking 2018-01-19 11:20:27 +01:00
emersion f061a1da63
output: fix software cursor artifacts 2018-01-18 22:18:53 +01:00
emersion 59ba8f35ed
rootston: use surface damage 2018-01-18 21:34:10 +01:00
emersion bde255933e
output: add wlr_output::damage, fixes #572 2018-01-18 19:47:21 +01:00
emersion 0eebaf98d0
drm: do not pageflip when enabling output 2018-01-15 21:49:37 +01:00
emersion 8ebd7d4dbe
output: rename resolution event to mode 2018-01-06 12:42:32 +01:00
emersion d9ecfbaf32
Add wlr_output enable event 2018-01-04 14:51:36 +01:00
emersion 771263380c
Add wlr_output::enabled 2018-01-04 12:46:15 +01:00
Drew DeVault b23bd8ea28
Merge pull request #544 from emersion/fix-views-outside-output-layout
Fix views outside output layout
2018-01-01 11:45:08 -05:00
emersion 9ac9ba861f
Free fullscreen surface and cursors when destroying output 2017-12-31 13:00:35 +01:00
emersion 1fe1d64042
Fix views outside output layout 2017-12-31 12:49:06 +01:00
Timidger 6e9cef4ed6
Don't send custom mode info twice on DRM refresh 2017-12-28 11:12:44 -06:00
Timidger f56ce11aa0
Fixes #535 send mode info on DRM refresh once
When DRM refreshed, wlr_output_set_mode is called. It would then call
the DRM set_mode callback which sends the updated matrix and mode info.

However once that call completed it would then immediantly send the
information again. This is handled poorly by xwayland, causing it to
scale up the clients twice.
2017-12-28 11:12:44 -06:00
emersion e737f65e38
Fix cursor on transformed output with DRM backend 2017-12-26 18:16:37 +01:00
emersion 01cefbb868
Output fixes
Fixes setting a hardware cursor image twice (used to fallback to
software cursor) and destroy handlers.
2017-12-19 11:06:09 +01:00
Tony Crisci d654a12b2e remove display_destroy unlisten before output free 2017-12-18 16:24:56 -05:00
Tony Crisci c59210ad17 remove display destroy when output is destroyed 2017-12-18 15:10:32 -05:00
emersion 0256de0002
Add full refresh rate support to custom modes 2017-12-17 18:02:55 +01:00
Drew DeVault 95fddf2fa8 s/L_INFO/L_DEBUG/ @ software cursor fallback 2017-12-16 09:56:30 -05:00
emersion 80b0b327de
Remove fractional output PR artifact 2017-12-15 17:14:30 +01:00
emersion 51db087210
Introduce fractional scaling 2017-12-15 01:00:03 +01:00
Drew DeVault 23fb663ea4
Merge pull request #453 from emersion/surface-transform
Add surface transforms support
2017-12-14 14:43:04 -05:00
emersion 466e86b7b2
Merge branch 'master' into surface-transform 2017-12-14 20:31:18 +01:00
emersion 75ef7860bb
Merge branch 'master' into display-destroy 2017-12-14 20:29:30 +01:00
emersion 257559d890
Remove output instead of terminating display when a wayland backend view closed 2017-12-13 21:48:59 +01:00
emersion 3b4b8953d9
Update output layout when scale or transform changes 2017-12-12 21:58:00 +01:00
emersion c67a5824b8
Merge branch 'master' into display-destroy 2017-12-11 16:14:03 +01:00
emersion 529675b7b0
Add wlr_output_set_custom_mode 2017-12-11 12:14:23 +01:00
emersion 15bb9a53b4
Fix unscaled cursor sx, sy 2017-12-08 14:40:57 +01:00
emersion 5dc303fc26
Fix client cursors hotspot on scaled outputs 2017-12-08 14:33:02 +01:00
emersion c5fa415a03
Send wl_surface.{enter,leave} to cursor surfaces 2017-12-08 14:23:33 +01:00
emersion 0e066f0d76
Listen to display destroy in output 2017-12-07 01:12:04 +01:00
emersion dac0233804
Send new output to clients when changing transform 2017-12-06 16:54:08 +01:00
emersion bf2b58eb6d
Add wlr_output_set_scale
Fixes #465
2017-12-06 16:36:46 +01:00
emersion 6a69b4419f
Make wlr_output_transform_* functions public, refactoring 2017-12-01 09:15:33 +01:00
Tony Crisci 5d7eb438d9
Merge pull request #437 from emersion/fullscreen
Fullscreen support
2017-11-30 03:25:05 -05:00
emersion 0781f6e483
Fix initial hardware cursor position 2017-11-29 00:26:55 +01:00
emersion cc2468923b
Fix non-HiDPI-aware fullscreen surface rendering in wlr_output 2017-11-21 21:12:12 +01:00
emersion 3262661e1e
Fix HiDPI support 2017-11-21 20:58:15 +01:00
emersion 5a664e1e46
Fix messed up outputs after fullscreen 2017-11-21 18:43:22 +01:00
emersion dcb168914e
Merge branch 'master' into fullscreen 2017-11-21 18:34:12 +01:00
emersion a268f57ed5
Forgot a call to glClear 2017-11-20 21:05:05 +01:00
emersion 54f1135c05
Fix fullscreen in xdg-shell 2017-11-20 20:53:13 +01:00
emersion 80998cdf57
Add support for fullscreen xwayland views 2017-11-20 17:58:26 +01:00