GUACAMOLE-249: Common surface should still pay attention to dirty flag, regardless of the new special case for unrealized surfaces.

This commit is contained in:
Michael Jumper 2020-01-06 11:15:00 -08:00
parent a54a12362c
commit 0677a9ae4d

View File

@ -280,13 +280,15 @@ static int __guac_common_surface_is_opaque(guac_common_surface* surface,
*/
static int __guac_common_should_combine(guac_common_surface* surface, const guac_common_rect* rect, int rect_only) {
int combined_cost, dirty_cost, update_cost;
/* Always favor combining updates if surface is currently a purely
* server-side scratch area */
if (!surface->realized)
return 1;
if (surface->dirty) {
int combined_cost, dirty_cost, update_cost;
/* Simulate combination */
guac_common_rect combined = surface->dirty_rect;
guac_common_rect_extend(&combined, rect);
@ -321,6 +323,8 @@ static int __guac_common_should_combine(guac_common_surface* surface, const guac
return 1;
}
}
/* Otherwise, do not combine */
return 0;