Andri Yngvason
b0ec79acf8
Move damage hints into buffer abstraction
2020-07-11 20:53:31 +00:00
Andri Yngvason
0615cd44c6
buffer: Add damage field
2020-07-11 20:53:31 +00:00
Andri Yngvason
0edaded063
Remove dead code
2020-07-11 20:53:30 +00:00
Andri Yngvason
84c57a7333
buffer: Fix pool release/acquire
2020-07-11 20:52:01 +00:00
Andri Yngvason
f68bb825e1
buffer: Fix error check and use non-linear
2020-07-11 20:52:01 +00:00
Andri Yngvason
0178dd8a39
screencopy: map dmabuf after it's ready
2020-07-11 20:52:01 +00:00
Andri Yngvason
19eb9af7e5
buffer: Unmap before release/destroy
2020-07-11 20:52:01 +00:00
Andri Yngvason
3fc07f571d
screencopy: Use linux-dmabuf if available
2020-07-11 20:52:01 +00:00
Andri Yngvason
70216b5829
main: Add gbm and linux-dmabuf
2020-07-11 20:52:01 +00:00
Andri Yngvason
4a21939b43
buffer: Use create_immed
2020-07-11 20:52:01 +00:00
Andri Yngvason
4fa019d31f
buffer: Add DMA-BUFs
2020-07-11 20:52:01 +00:00
Andri Yngvason
9b136c90de
buffer: Add specific handling for different buffers
2020-07-11 20:52:01 +00:00
Andri Yngvason
480392e40c
buffer: Add buffer type to interface
2020-07-11 20:52:01 +00:00
Andri Yngvason
59cc119d76
main: Refine damage hints
2020-07-11 20:52:01 +00:00
Andri Yngvason
fe590f3940
damage-refinery: Use damage hint
2020-07-11 20:52:01 +00:00
Andri Yngvason
e398dcc235
damage-refinery: Hash directly instead of copying
2020-07-11 20:52:01 +00:00
Andri Yngvason
439d3997d4
damage-refinery: Use negative stride to handle y-inversion
2020-07-11 20:52:01 +00:00
Andri Yngvason
c515a29951
Create hash based damage checker
2020-07-11 20:52:01 +00:00
Andri Yngvason
946ace1760
Fix damage transform
2020-07-11 20:52:01 +00:00
Andri Yngvason
12555bea13
pixman-renderer: Use negative stride for y-inversion
2020-07-11 20:52:01 +00:00
Andri Yngvason
1cafc25655
Transform damage coordinates
2020-07-11 20:52:01 +00:00
Andri Yngvason
6b1dc2e6c3
Add utilities for managing output transforms
2020-07-11 20:52:01 +00:00
Andri Yngvason
507b76dfbd
Create pixman renderer
2020-07-11 20:52:01 +00:00
Andri Yngvason
29f1669d55
buffer: Leave pixman out of buffers
2020-07-11 20:52:01 +00:00
Andri Yngvason
e65cae43c2
Extract pixel format conversion into own file
2020-07-11 20:52:01 +00:00
Andri Yngvason
a6e1ba25ea
Render using pixman
2020-07-11 20:52:00 +00:00
Andri Yngvason
4fb472f611
Create a buffer abstraction
2020-07-11 20:52:00 +00:00
Andri Yngvason
0a139a1ac4
Align with aml API changes
2020-07-06 16:46:30 +00:00
Andri Yngvason
4f1bca55c3
Exit when main selected seat/output goes away
2020-06-12 23:15:22 +00:00
Andri Yngvason
041ac60ef6
renderer: Add more error messages
2020-06-10 22:09:22 +00:00
Andri Yngvason
ff882b7774
keyboard: Ignore shift level on modifiers
2020-05-26 22:19:48 +00:00
Andri Yngvason
ff1223e4f9
keyboard: Fix comparison of signed and unsigned value
2020-05-18 20:38:48 +00:00
Andri Yngvason
9b48290d09
Improve error handling in wayland dispatch
2020-05-10 12:21:10 +00:00
Andri Yngvason
151e916752
renderer: Set GL_PACK_ALIGNMENT to 1
...
Otherwise row stride will multiple of 4, even for damage data.
2020-05-10 12:21:10 +00:00
Andri Yngvason
0761a5b818
damage: Fix uninitialised value
2020-05-10 12:21:10 +00:00
Andri Yngvason
4f5933c07f
dmabuf: Limit rate to 30 FPS
2020-05-03 19:58:50 +00:00
Andri Yngvason
f5453ffe1e
keyboard: Relax matching criteria on shift level
...
Clients behave differently when it comes to sending release events for keys,
so it's hard to rely on any one kind of behaviour.
2020-05-01 17:34:22 +00:00
Andri Yngvason
405268fc58
keyboard: Log keyboard symbol lookup errors
2020-05-01 17:19:14 +00:00
Andri Yngvason
6e889211db
renderer: Run glFinish() before glReadPixels()
2020-04-26 14:15:57 +00:00
Andri Yngvason
8cc8c198d2
renderer: Run glFinish() after rendering dmabuf frame
2020-04-26 14:14:06 +00:00
Andri Yngvason
06a249897b
dmabuf: Show a debug message when frames are held for too long.
2020-04-26 14:14:06 +00:00
Andri Yngvason
04569b01f2
dmabuf: Add dtrace probes
2020-04-26 11:24:29 +00:00
Andri Yngvason
9d6310cb14
dmabuf: Remove rate limiting
2020-04-26 10:39:58 +00:00
Andri Yngvason
6becbacbe5
Align with NeatVNC interface changes
2020-04-12 21:46:48 +00:00
Andri Yngvason
1fc664a014
Remove call to nvnc_set_dimensions()
2020-04-12 16:14:18 +00:00
Andri Yngvason
f9deca5c9c
shm: Add copyright notice
...
Putting a proper license on this to appease package maintainers.
2020-04-12 13:08:42 +00:00
Greg V
3f62295214
keyboard: rename keymap_len to keymap_size
2020-04-09 15:39:09 +03:00
Greg V
fa49aca45a
keyboard: check that write finished writing everything
...
(Use loop to write until the end)
2020-04-09 15:38:13 +03:00
Greg V
ccc582cd58
keyboard: allocate shm with *actually* correct size
...
strlen returns "the number of characters that precede the terminating NUL".
We do need to send the \0 byte, since xkbcommon on the receiving end
*is* expecting a C string. And e.g. wlroots does strlen+1.
2020-04-09 15:37:18 +03:00
Andri Yngvason
14d62d0029
Fix transformations
...
This fixes #29
2020-04-09 11:50:48 +00:00
Andri Yngvason
58a181ccbc
Redesign update/rendering loop
...
Every change to the framebuffer is now copied into a single buffer
inside a single callback. This simplifies things a lot, and might even
perform better.
2020-04-07 23:37:31 +00:00
Greg V
d610076614
shm: support memfd and SHM_ANON
2020-04-06 02:07:25 +03:00
Greg V
720b127dee
keyboard: allocate shm with correct size
...
This was working on Linux because shm_open there returns a regular file,
but this is required on FreeBSD where shm_open returns a memory-backed fd.
2020-04-06 00:26:22 +03:00
Andri Yngvason
be401b5e4a
Report error when binding to address fails
...
This fixes #21
2020-04-04 22:38:23 +00:00
Andri Yngvason
6e521a07a0
Merge frames rather than dropping them when encoder is too slow
2020-04-04 21:03:49 +00:00
Andri Yngvason
238c196e6b
Capture a new frame immediately when a client requests a whole frame
2020-04-04 15:01:38 +00:00
Andri Yngvason
ee4917f200
Make sure that frames being written to are not in use by the encoder
2020-04-04 13:14:07 +00:00
Andri Yngvason
8ce312e9eb
renderer: Add dtrace probes
2020-04-02 00:55:18 +00:00
Andri Yngvason
075680994e
screencopy: Add dtrace probes
2020-04-02 00:34:00 +00:00
Andri Yngvason
dc7adf8f3b
renderer: Use ATTR_INDEX_ constants for glEnableVertex*
2020-03-29 14:05:33 +00:00
Andri Yngvason
e85f219aff
Make sure damage buffer is properly aligned
2020-03-29 13:09:28 +00:00
Andri Yngvason
b14a0b854b
Rotate NeatVNC framebuffers rather than allocating new ones
2020-03-28 19:23:03 +00:00
Andri Yngvason
2bb17c8215
Blit the whole frame when a new client connects
2020-03-28 15:20:59 +00:00
Andri Yngvason
e7586e8753
Only copy the damaged region from GPU
2020-03-28 15:05:04 +00:00
Andri Yngvason
1ebd9a7647
damage: Respect frame boundaries
2020-03-28 14:34:12 +00:00
Andri Yngvason
b6ca7aff8c
Join process_frame() and update_vnc()
2020-03-28 14:09:29 +00:00
Andri Yngvason
bfbc81bf04
Use GPU damage checker
2020-03-28 13:07:33 +00:00
Andri Yngvason
52c18ffe23
damage: Add asynchronous damage checking
2020-03-28 13:05:59 +00:00
Andri Yngvason
7f5431d922
Move rendering calls into frame-capture
2020-03-28 11:44:40 +00:00
Andri Yngvason
c91816f247
Implement damage buffer conversion
2020-03-28 10:59:21 +00:00
Andri Yngvason
b0a6b6bd2a
renderer: Swap FPOs rather than textures
2020-03-28 10:59:21 +00:00
Andri Yngvason
ae90348ece
renderer: Save previous rendered frame rather than previous imported frame
...
We can't keep dmabufs very long.
2020-03-26 21:43:35 +00:00
Andri Yngvason
b5f1ff0898
renderer: Render to texture
2020-03-26 18:49:37 +00:00
Andri Yngvason
7e709c23e9
renderer: Add damage renderer
2020-03-25 23:21:11 +00:00
Andri Yngvason
6536cbd56f
renderer: Add damage shaders
2020-03-25 23:21:11 +00:00
Andri Yngvason
557f0f365b
renderer: Set up texture bindings on render()
2020-03-25 21:27:57 +00:00
Andri Yngvason
a8fd0d6765
renderer: Show error when linking shaders fails
2020-03-25 21:07:36 +00:00
Andri Yngvason
996729f9bb
renderer: Show error message when shader compilation failse
2020-03-25 20:44:54 +00:00
Andri Yngvason
13216fa507
renderer: Add u_tex1 to shaders
2020-03-25 20:26:15 +00:00
Andri Yngvason
49c584f80d
renderer: Move shader setup into render()
2020-03-24 22:57:02 +00:00
Andri Yngvason
4da96d0dc1
renderer: Split buffer import and rendering
2020-03-24 22:48:13 +00:00
Andri Yngvason
9d058c85ce
Renderer: Keep last texture
2020-03-24 22:07:49 +00:00
Andri Yngvason
b39e7535ee
renderer: Use FBO instead of pbuffer
...
This is in preperation for damage checking on the GPU
2020-03-24 19:17:23 +00:00
Andri Yngvason
a12ce12ba6
Exit when compositor goes away
2020-03-22 20:29:13 +00:00
Andri Yngvason
26cef852b6
Replace libuv with aml
2020-03-21 16:46:10 +00:00
Andri Yngvason
7ea17d04aa
Apply output transformation to pointer coordinates
2020-03-07 14:19:02 +00:00
Andri Yngvason
e8279e57f5
Apply output transform to damage hint coordinates
2020-03-07 14:15:09 +00:00
Andri Yngvason
8ff7128714
output: Add coordinate transformations
2020-03-07 14:13:59 +00:00
Andri Yngvason
433ee722ec
render: Implement rest of transforms
2020-03-07 12:16:01 +00:00
Andri Yngvason
c32993d87d
Use transformed geometry for frame buffers
2020-03-05 22:05:14 +00:00
Andri Yngvason
9642e086d8
render: Set glViewport based on output transform
2020-03-05 22:05:14 +00:00
Andri Yngvason
e01f75bfbd
output: Add functions to get transformed geometry
2020-03-05 22:05:14 +00:00
Andri Yngvason
35ffc2dac7
output: Add transform
2020-03-05 22:05:14 +00:00
Andri Yngvason
a3d4189a0b
render: Add output transforms
2020-03-05 22:05:14 +00:00
Andri Yngvason
a327a2f6dd
render: Add 2D projections
2020-03-05 18:46:27 +00:00
Andri Yngvason
1bf618a098
render: Fetch uniform locations in one place
2020-03-05 18:20:54 +00:00
Andri Yngvason
6b3b448405
render: Move shader_program into shader struct
2020-03-05 18:14:50 +00:00
Andri Yngvason
1e6c89d9a9
output: Use non-scaled geometry
...
This fixes #16
2020-03-04 21:40:33 +00:00
Andri Yngvason
a70a2b1bc4
pointer: Remove output position from coordinates
...
This is no longer required as the input is mapped to the output in the
compositor.
2020-02-21 23:28:36 +00:00
Andri Yngvason
10e5c08752
Map input to the selected output
2020-02-21 23:28:33 +00:00