Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUACAMOLE-377: Add libguac "guac_display" API for easy and efficient rendering. #525

Merged
merged 53 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
104006c
GUACAMOLE-377: Establish public guac_display API for efficient render…
mike-jumper Jun 3, 2024
028fb58
GUACAMOLE-377: Tighten dirty rects down to the individual pixel, rath…
mike-jumper Jun 12, 2024
5814072
GUACAMOLE-377: Update layer list head upon layer removal only if non-…
mike-jumper Jun 13, 2024
b965c4d
GUACAMOLE-377: Do NOT acquire the ops lock before any frame lock.
mike-jumper Jun 13, 2024
619eb2e
GUACAMOLE-377: Correct logic and lock order around deferred frame flu…
mike-jumper Jun 13, 2024
f898ead
GUACAMOLE-377: Clarify logic around opaque layers.
mike-jumper Jun 13, 2024
442b33e
GUACAMOLE-377: Ensure regions outside last frame bounds are considere…
mike-jumper Jun 18, 2024
e396ed5
GUACAMOLE-377: Migrate guac_mem_*() assertions to GUAC_ASSERT().
mike-jumper Jun 8, 2024
8afbeae
GUACAMOLE-377: Do not render frames while users are joining.
mike-jumper Jun 18, 2024
692400c
GUACAMOLE-377: Flush an automatic frame for mouse changes only if the…
mike-jumper Jun 18, 2024
335d5e2
GUACAMOLE-377: Updates to cursor must occur within the boundary of th…
mike-jumper Jun 19, 2024
15e400e
GUACAMOLE-377: Ensure all layers supporting transparency are properly…
mike-jumper Jun 19, 2024
4f3fccd
GUACAMOLE-377: Add ability to "hint" that a drawing operation copied …
mike-jumper Jun 19, 2024
c994b2e
GUACAMOLE-377: Use 2 worker threads per available processor.
mike-jumper Aug 7, 2024
63ecfd8
GUACAMOLE-377: Do not use threaded WebP encoder given that guac_displ…
mike-jumper Aug 7, 2024
d644722
GUACAMOLE-377: Migrate VNC support to guac_display API.
mike-jumper Jun 4, 2024
b030ced
GUACAMOLE-377: Group all guac_display documentation together under a …
mike-jumper Aug 7, 2024
3f88d3e
GUACAMOLE-377: Migrate RDP to guac_display.
mike-jumper Aug 18, 2024
d99c5c0
GUACAMOLE-377: Replace RDP settings string (rather than reuse storage…
mike-jumper Sep 18, 2024
28687cb
GUACAMOLE-377: Use FreeRDP's built-in GDI handling of bitmap cache.
mike-jumper Aug 31, 2024
1f0a365
GUACAMOLE-377: Migrate terminal emulator to guac_display.
mike-jumper Aug 8, 2024
3b6173f
GUACAMOLE-377: Work around libssh2 usage of strlen() on key data (oth…
mike-jumper Sep 1, 2024
40eef95
GUACAMOLE-377: Increase maximum number of streams.
mike-jumper Aug 18, 2024
dc133ea
GUACAMOLE-377: Ignore directories and files used by Clang compilation…
mike-jumper Aug 16, 2024
ba5511c
GUACAMOLE-377: Correct return value confusion in handling of timeout …
mike-jumper Aug 20, 2024
c48409c
GUACAMOLE-377: Prefer GUAC_COMP_OVER to GUAC_COMP_SRC for performance…
mike-jumper Aug 24, 2024
de30928
GUACAMOLE-377: Remove all old surface, display, cursor, and rect code…
mike-jumper Aug 28, 2024
8003836
GUACAMOLE-377: Ensure frame boundaries are sent even for frames conta…
mike-jumper Sep 1, 2024
3aae603
GUACAMOLE-377: Migrate from timer to thread for pending users.
mike-jumper Sep 1, 2024
7e593c0
GUACAMOLE-377: Restore heuristic detection of RDP frame boundaries.
mike-jumper Sep 9, 2024
dc833c7
GUACAMOLE-377: Restore heuristic detection of VNC frame boundaries.
mike-jumper Sep 9, 2024
cbfeae6
GUACAMOLE-377: Allow the pending frame buffer for a guac_display_laye…
mike-jumper Sep 11, 2024
fa37f00
GUACAMOLE-377: Allow external guac_display buffers to be replaced wit…
mike-jumper Sep 27, 2024
d31a96c
GUACAMOLE-377: Migrate RDP to direct access of FreeRDP's GDI buffer.
mike-jumper Sep 11, 2024
b667f69
GUACAMOLE-377: Migrate VNC to direct access of RFB framebuffer.
mike-jumper Sep 11, 2024
6a7eb6d
GUACAMOLE-377: Wrap all VNC message handling within drawing context.
mike-jumper Sep 27, 2024
8c341bc
GUACAMOLE-377: Remove unnecessary locking of last frame during resize.
mike-jumper Sep 18, 2024
ae52278
GUACAMOLE-377: Restore good ol' guac_common_surface and guac_common_c…
mike-jumper Sep 5, 2024
4145f58
GUACAMOLE-377: Revert migration of terminal emulator to guac_display.
mike-jumper Sep 5, 2024
c6833a4
GUACAMOLE-377: Make vertical combination more likely by limiting comb…
mike-jumper Sep 20, 2024
540d204
GUACAMOLE-377: Read lock should NOT be acquired at same time as write…
mike-jumper Sep 21, 2024
f348506
GUACAMOLE-377: Do NOT combine display operations vertically unless ed…
mike-jumper Sep 24, 2024
5ec7be1
GUACAMOLE-377: Do not allow "img" instructions to break "rect" and "c…
mike-jumper Sep 25, 2024
260f959
GUACAMOLE-377: Reduce number of worker threads to one per processor.
mike-jumper Sep 25, 2024
8f5c3e9
GUACAMOLE-377: Synchronize layer contents only if non-empty.
mike-jumper Sep 26, 2024
f2f74c2
GUACAMOLE-377: Ignore alpha for rectangle operations on opaque layers.
mike-jumper Sep 26, 2024
0da3354
GUACAMOLE-377: Add convenient, default render thread implementation f…
mike-jumper Sep 28, 2024
98fd5e6
GUACAMOLE-377: Migrate RDP to default render thread.
mike-jumper Sep 28, 2024
5a12d96
GUACAMOLE-377: Migrate VNC to default render loop.
mike-jumper Sep 28, 2024
db42844
GUACAMOLE-377: Remove superfluous bounds check (now part of guac_pool).
mike-jumper Sep 28, 2024
ed38863
GUACAMOLE-377: Restore original NULL returns for alloc failures of st…
mike-jumper Sep 28, 2024
4220670
GUACAMOLE-377: Fix regression causing RDP connections to always recon…
mike-jumper Sep 28, 2024
f5ecb6c
GUACAMOLE-377: Stream/object sentinel must be assigned BEFORE returni…
mike-jumper Sep 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ doc/*/doxygen-output

# IDE metadata
nbproject/

# Compilation database, as may be generated by tools like Bear
jmuehlner marked this conversation as resolved.
Show resolved Hide resolved
.cache/
compile_commands.json
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ PKG_PROG_PKG_CONFIG()
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/socket.h time.h sys/time.h syslog.h unistd.h cairo/cairo.h pngstruct.h])

# Source characteristics
AC_DEFINE([_GNU_SOURCE], [1], [Uses GNU-specific APIs (if available)])
AC_DEFINE([_XOPEN_SOURCE], [700], [Uses X/Open and POSIX APIs])
AC_DEFINE([__BSD_VISIBLE], [1], [Uses BSD-specific APIs (if available)])

# Check for availability of non-portable sched_getaffinity() function (one of
# several possible routes for determining the number of available processors)
AC_CHECK_FUNCS([sched_getaffinity])

# Check for whether math library is required
AC_CHECK_LIB([m], [cos],
[MATH_LIBS=-lm],
Expand Down
13 changes: 10 additions & 3 deletions src/common-ssh/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,25 @@ guac_common_ssh_key* guac_common_ssh_key_alloc(char* data, int length,
* different key algorithms) we need to perform a heuristic here to check
* if a passphrase is needed. This could allow junk keys through that
* would never be able to auth. libssh2 should display errors to help
* admins track down malformed keys and delete or replace them.
*/
* admins track down malformed keys and delete or replace them. */

if (is_passphrase_needed(data, length) && (passphrase == NULL || *passphrase == '\0'))
return NULL;

guac_common_ssh_key* key = guac_mem_alloc(sizeof(guac_common_ssh_key));

/* NOTE: Older versions of libssh2 will at times ignore the declared key
* length and instead recalculate the length using strlen(). This has since
* been fixed, but as of this writing the fix has not yet been released.
* Below, we add our own null terminator to ensure that such calls to
* strlen() will work without issue. We can remove this workaround once
* copies of libssh2 that use strlen() on key data are not in common use. */

/* Copy private key to structure */
key->private_key_length = length;
key->private_key = guac_mem_alloc(length);
key->private_key = guac_mem_alloc(guac_mem_ckd_add_or_die(length, 1)); /* Extra byte added here for null terminator (see above) */
memcpy(key->private_key, data, length);
jmuehlner marked this conversation as resolved.
Show resolved Hide resolved
key->private_key[length] = '\0'; /* Manually-added null terminator (see above) */
key->passphrase = guac_strdup(passphrase);

return key;
Expand Down
2 changes: 0 additions & 2 deletions src/common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ noinst_HEADERS = \
common/clipboard.h \
common/cursor.h \
common/defaults.h \
common/display.h \
common/dot_cursor.h \
common/ibar_cursor.h \
common/iconv.h \
Expand All @@ -51,7 +50,6 @@ libguac_common_la_SOURCES = \
blank_cursor.c \
clipboard.c \
cursor.c \
display.c \
dot_cursor.c \
ibar_cursor.c \
iconv.c \
Expand Down
293 changes: 0 additions & 293 deletions src/common/common/display.h

This file was deleted.

Loading
Loading