diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-23 13:03:27 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-23 13:06:28 +0000 |
commit | 60549f7a56d2b021ab612a6b66e720d31f3400ad (patch) | |
tree | 50a5ef27efc0b786a3b4b4fff28afe9634e706d8 /src/win32 | |
parent | c5b8cfab87754a0b7b41a257fdaa1b0776537cf8 (diff) |
win32: Copy back the fallback damage to the right location
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/win32')
-rw-r--r-- | src/win32/cairo-win32-display-surface.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/win32/cairo-win32-display-surface.c b/src/win32/cairo-win32-display-surface.c index a66a23ef..6123f7e3 100644 --- a/src/win32/cairo-win32-display-surface.c +++ b/src/win32/cairo-win32-display-surface.c @@ -546,7 +546,7 @@ _cairo_win32_display_surface_flush (void *abstract_surface) rect.x, rect.y, rect.width, rect.height, fallback->win32.dc, - 0, 0, + rect.x, rect.y, SRCCOPY)) { status = _cairo_win32_print_gdi_error (__FUNCTION__); break; @@ -566,7 +566,8 @@ static cairo_status_t _cairo_win32_display_surface_mark_dirty (void *abstract_surface, int x, int y, int width, int height) { - _cairo_win32_display_surface_discard_fallback (abstract_surface); + cairo_win32_display_surface_t *surface = abstract_surface; + assert (surface->fallback == NULL); return CAIRO_STATUS_SUCCESS; } @@ -740,10 +741,10 @@ _cairo_win32_display_surface_unset_clip (cairo_win32_display_surface_t *surface) void _cairo_win32_display_surface_discard_fallback (cairo_win32_display_surface_t *surface) { - TRACE ((stderr, "%s (surface=%d)\n", - __FUNCTION__, surface->win32.base.unique_id)); - if (surface->fallback) { + TRACE ((stderr, "%s (surface=%d)\n", + __FUNCTION__, surface->win32.base.unique_id)); + cairo_surface_destroy (surface->fallback); surface->fallback = NULL; } |