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:
parent
a54a12362c
commit
0677a9ae4d
@ -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) {
|
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
|
/* Always favor combining updates if surface is currently a purely
|
||||||
* server-side scratch area */
|
* server-side scratch area */
|
||||||
if (!surface->realized)
|
if (!surface->realized)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
if (surface->dirty) {
|
||||||
|
|
||||||
|
int combined_cost, dirty_cost, update_cost;
|
||||||
|
|
||||||
/* Simulate combination */
|
/* Simulate combination */
|
||||||
guac_common_rect combined = surface->dirty_rect;
|
guac_common_rect combined = surface->dirty_rect;
|
||||||
guac_common_rect_extend(&combined, 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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* Otherwise, do not combine */
|
/* Otherwise, do not combine */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user