Skip to content

Commit

Permalink
GUACAMOLE-377: Remove unnecessary locking of last frame during resize.
Browse files Browse the repository at this point in the history
No longer necessary now that the last and pending frame buffers are not
interleaved.
  • Loading branch information
mike-jumper committed Sep 18, 2024
1 parent 921b620 commit f508677
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/libguac/display-layer-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ void guac_display_remove_layer(guac_display_layer* display_layer) {

}

void PFW_LFW_guac_display_layer_resize(guac_display_layer* layer, int width, int height) {
void PFW_guac_display_layer_resize(guac_display_layer* layer, int width, int height) {

/* Flush and destroy any cached Cairo context */
guac_display_layer_cairo_context* cairo_context = &(layer->pending_frame_cairo_context);
Expand Down
4 changes: 1 addition & 3 deletions src/libguac/display-layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,10 @@ void guac_display_layer_resize(guac_display_layer* layer, int width, int height)

guac_display* display = layer->display;
guac_rwlock_acquire_write_lock(&display->pending_frame.lock);
guac_rwlock_acquire_write_lock(&display->last_frame.lock);

PFW_LFW_guac_display_layer_resize(layer, width, height);
PFW_guac_display_layer_resize(layer, width, height);
PFW_guac_display_layer_touch(layer);

guac_rwlock_release_lock(&display->last_frame.lock);
guac_rwlock_release_lock(&display->pending_frame.lock);

}
Expand Down
2 changes: 1 addition & 1 deletion src/libguac/display-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ void guac_display_remove_layer(guac_display_layer* display_layer);
* @param height
* The new height, in pixels.
*/
void PFW_LFW_guac_display_layer_resize(guac_display_layer* layer,
void PFW_guac_display_layer_resize(guac_display_layer* layer,
int width, int height);

/**
Expand Down

0 comments on commit f508677

Please sign in to comment.