[Spice-devel] [PATCH x11spice v4 2/3] Create separate shm_segment_t struct for SHM segments

2019-08-19 Thread Brendan Shanks
Signed-off-by: Brendan Shanks --- doc/spice_indent | 1 + src/display.c| 30 +++--- src/display.h| 8 ++-- src/scan.c | 2 +- src/session.c| 2 +- src/spice.c | 2 +- 6 files changed, 25 insertions(+), 20 deletions(-) diff --git a/doc

[Spice-devel] [PATCH x11spice v4 1/3] Use unsigned int/size_t for display width/height/buffer size

2019-08-19 Thread Brendan Shanks
Signed-off-by: Brendan Shanks --- src/display.c | 8 src/display.h | 14 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/display.c b/src/display.c index 77b4d4e..3294f83 100644 --- a/src/display.c +++ b/src/display.c @@ -59,7 +59,7 @@ static

[Spice-devel] [PATCH x11spice v4 3/3] Add cache for SHM segments

2019-08-19 Thread Brendan Shanks
reports (like resizing or moving windows) will lower the hit rate. Signed-off-by: Brendan Shanks --- src/display.c | 173 ++ src/display.h | 11 +++- 2 files changed, 168 insertions(+), 16 deletions(-) diff --git a/src/display.c b/src/display.c

[Spice-devel] [PATCH x11spice v4 0/3] Add cache for SHM segments

2019-08-19 Thread Brendan Shanks
Add a cache to x11spice for SHM segments. v4 simplifies the 'if' clauses in shm_cache_get/add, as suggested by Frediano. Brendan Shanks (3): Use unsigned int/size_t for display width/height/buffer size Create separate shm_segment_t struct for SHM segments Add cache for SHM segm

[Spice-devel] [PATCH x11spice v3 1/3] Use unsigned int/size_t for display width/height/buffer size

2019-08-16 Thread Brendan Shanks
Signed-off-by: Brendan Shanks --- src/display.c | 8 src/display.h | 14 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/display.c b/src/display.c index 77b4d4e..3294f83 100644 --- a/src/display.c +++ b/src/display.c @@ -59,7 +59,7 @@ static

[Spice-devel] [PATCH x11spice v3 2/3] Create separate shm_segment_t struct for SHM segments

2019-08-16 Thread Brendan Shanks
Signed-off-by: Brendan Shanks --- doc/spice_indent | 1 + src/display.c| 30 +++--- src/display.h| 8 ++-- src/scan.c | 2 +- src/session.c| 2 +- src/spice.c | 2 +- 6 files changed, 25 insertions(+), 20 deletions(-) diff --git a/doc

[Spice-devel] [PATCH x11spice v3 3/3] Add cache for SHM segments

2019-08-16 Thread Brendan Shanks
reports (like resizing or moving windows) will lower the hit rate. Signed-off-by: Brendan Shanks --- src/display.c | 175 ++ src/display.h | 11 +++- 2 files changed, 170 insertions(+), 16 deletions(-) diff --git a/src/display.c b/src/display.c

[Spice-devel] [PATCH x11spice v3 0/3] Add cache for SHM segments

2019-08-16 Thread Brendan Shanks
Add a cache to x11spice for SHM segments. v3 rebases, fixes a bug in the next-biggest-entry handling in shm_cache_get(), and adds a comment in display.h to explain the cache size. Brendan Shanks (3): Use unsigned int/size_t for display width/height/buffer size Create separate shm_segment_t

[Spice-devel] [PATCH x11spice v2] Use separate buffer for primary surface to fix graphical corruption

2019-08-06 Thread Brendan Shanks
ion. Create a separate SHM segment 'display->primary' and use it only for the primary surface. Signed-off-by: Brendan Shanks --- v2: Rename local variable 'fullscreen' to 'primary' in spice_start() --- src/display.c | 20 +++- src/dis

[Spice-devel] [PATCH x11spice] Use separate buffer for primary surface to fix graphical corruption

2019-08-05 Thread Brendan Shanks
ion. Create a separate SHM segment 'display->primary' and use it only for the primary surface. Signed-off-by: Brendan Shanks --- src/display.c | 20 +++- src/display.h | 1 + src/main.c| 2 +- src/session.c | 2 +- 4 files changed, 22 insertions(+), 3 deleti

[Spice-devel] [PATCH x11spice] Fix running tests on Debian/Ubuntu

2019-08-05 Thread Brendan Shanks
Check the Debian/Ubuntu path for the non-wrapper Xorg binary Signed-off-by: Brendan Shanks --- src/tests/xdummy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/xdummy.c b/src/tests/xdummy.c index 0651dc7..ce57b1c 100644 --- a/src/tests/xdummy.c +++ b/src/tests/xdummy.c

Re: [Spice-devel] [PATCH x11spice v2 0/3] Add cache for SHM segments

2019-07-25 Thread Brendan Shanks
> On Jul 16, 2019, at 7:16 PM, Brendan Shanks wrote: > > Add a cache to x11spice for SHM segments. > > v2 should address Frediano's comments: style, use of G_N_ELEMENTS, > using unsigned types for width/height/size, creating a separate struct > to hold all the segme

[Spice-devel] [PATCH x11spice v2 1/3] Use unsigned int/size_t for display width/height/buffer size

2019-07-16 Thread Brendan Shanks
Signed-off-by: Brendan Shanks --- src/display.c | 8 src/display.h | 14 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/display.c b/src/display.c index 01e0e85..47f6bd7 100644 --- a/src/display.c +++ b/src/display.c @@ -59,7 +59,7 @@ static

[Spice-devel] [PATCH x11spice v2 2/3] Create separate shm_segment_t struct for SHM segments

2019-07-16 Thread Brendan Shanks
Signed-off-by: Brendan Shanks --- doc/spice_indent | 1 + src/display.c| 30 +++--- src/display.h| 8 ++-- src/scan.c | 2 +- src/session.c| 2 +- src/spice.c | 2 +- 6 files changed, 25 insertions(+), 20 deletions(-) diff --git a/doc

[Spice-devel] [PATCH x11spice v2 0/3] Add cache for SHM segments

2019-07-16 Thread Brendan Shanks
Add a cache to x11spice for SHM segments. v2 should address Frediano's comments: style, use of G_N_ELEMENTS, using unsigned types for width/height/size, creating a separate struct to hold all the segment-specific variables, and reducing traversals of the cache. Brendan Shanks (3): Use uns

[Spice-devel] [PATCH x11spice v2 3/3] Add cache for SHM segments

2019-07-16 Thread Brendan Shanks
reports (like resizing or moving windows) will lower the hit rate. Signed-off-by: Brendan Shanks --- src/display.c | 177 ++ src/display.h | 7 +- 2 files changed, 169 insertions(+), 15 deletions(-) diff --git a/src/display.c b/src/display.c

[Spice-devel] [PATCH x11spice v2] Fix hang when launching with invalid config

2019-07-12 Thread Brendan Shanks
infinite loop waiting for it to be 0. Initialize the entire session struct to 0. Signed-off-by: Brendan Shanks --- src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.c b/src/main.c index 5dde233..7f321af 100644 --- a/src/main.c +++ b/src/main.c @@ -63,6 +63,8 @@ int main(i

Re: [Spice-devel] [PATCH x11spice] Fix hang when launching with invalid config

2019-07-12 Thread Brendan Shanks
cation and it would never quit. >> >> s->draw_command_in_progress was uninitialized, and flush_and_lock() >> would get stuck in an infinite loop waiting for it to be 0. >> >> Initialize s->draw_command_in_progress to 0. >> >> Signed-off-by: Brendan Shanks >> --- &g

[Spice-devel] [PATCH x11spice] Add cache for SHM segments

2019-07-11 Thread Brendan Shanks
fixed number of 10 entries, this provided a good cache hit rate while keeping memory usage under control. In my testing, over 90% of requests for SHM segments were being satisfied from the cache. Signed-off-by: Brendan Shanks --- src/display.c | 172

[Spice-devel] [PATCH x11spice] Fix segfault when quitting with Quit button

2019-07-11 Thread Brendan Shanks
A: main (main.c:154) Signed-off-by: Brendan Shanks --- src/spice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spice.c b/src/spice.c index 8ec0b07..d966644 100644 --- a/src/spice.c +++ b/src/spice.c @@ -689,9 +689,9 @@ void spice_end(spice_t *s) { spice_server_remo

[Spice-devel] [PATCH x11spice] Fix hang when launching with invalid config

2019-07-11 Thread Brendan Shanks
infinite loop waiting for it to be 0. Initialize s->draw_command_in_progress to 0. Signed-off-by: Brendan Shanks --- src/session.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/session.c b/src/session.c index 1e59415..c5a439c 100644 --- a/src/session.c +++ b/src/session.c @@ -306