[cairo] [PATCH 36/39] [OpenVG] added a logical clock to keep track of dirt.
tardyp at gmail.com
tardyp at gmail.com
Fri Jul 10 10:02:38 PDT 2009
From: Øyvind Kolås <pippin at gimp.org>
---
src/cairo-surface-private.h | 2 ++
src/cairo-surface.c | 4 ++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/cairo-surface-private.h b/src/cairo-surface-private.h
index c25b6dc..4e6d1a8 100644
--- a/src/cairo-surface-private.h
+++ b/src/cairo-surface-private.h
@@ -108,6 +108,8 @@ struct _cairo_surface {
*/
cairo_bool_t has_font_options;
cairo_font_options_t font_options;
+
+ unsigned int dirt_serial;
};
#endif /* CAIRO_SURFACE_PRIVATE_H */
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 16e8492..f57e692 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -1072,6 +1072,10 @@ cairo_surface_mark_dirty_rectangle (cairo_surface_t *surface,
status = _cairo_surface_set_error (surface, CAIRO_STATUS_SURFACE_FINISHED);
return;
}
+
+ /* increment the dirt serial, indicating that caches of the surface content
+ * is not valid */
+ surface->dirt_serial ++;
/* The application *should* have called cairo_surface_flush() before
* modifying the surface independently of cairo (and thus having to
--
1.6.0.4
More information about the cairo
mailing list