From dbec5a5957cc95f20a087846cb34e6dc34804238 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 3 May 2014 21:11:42 -0700 Subject: [PATCH] GUAC-666: Detect left-to-right fill pattern. --- src/common/guac_surface.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/guac_surface.c b/src/common/guac_surface.c index e4e0fb70..b838c1ec 100644 --- a/src/common/guac_surface.c +++ b/src/common/guac_surface.c @@ -127,6 +127,10 @@ static int __guac_common_should_combine(guac_common_surface* surface, int x, int if (combined_cost - update_cost <= update_cost / GUAC_SURFACE_NEGLIGIBLE_INCREASE) return 1; + /* Combine if we anticipate further updates, as this update follows a common fill pattern */ + if (x == surface->dirty_x && y == surface->dirty_y + surface->dirty_height) + return 1; + } /* Otherwise, do not combine */