michael@0: Date: Thu Jan 5 18:40:01 2012 -0500 michael@0: michael@0: Bug 715704. Add a quartz implementation of mark_dirty_rectangle. r=roc michael@0: michael@0: We need to drop our CGImage cache when the surface has been changed by outside users. michael@0: michael@0: diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c michael@0: --- a/gfx/cairo/cairo/src/cairo-quartz-surface.c michael@0: +++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c michael@0: @@ -3116,16 +3116,27 @@ _cairo_quartz_surface_clipper_intersect_ michael@0: CGContextEOClip (surface->cgContext); michael@0: } michael@0: michael@0: ND((stderr, "-- intersect_clip_path\n")); michael@0: michael@0: return CAIRO_STATUS_SUCCESS; michael@0: } michael@0: michael@0: +static cairo_status_t michael@0: +_cairo_quartz_surface_mark_dirty_rectangle (void *abstract_surface, michael@0: + int x, int y, michael@0: + int width, int height) michael@0: +{ michael@0: + cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface; michael@0: + _cairo_quartz_surface_will_change (surface); michael@0: + return CAIRO_STATUS_SUCCESS; michael@0: +} michael@0: + michael@0: + michael@0: // XXXtodo implement show_page; need to figure out how to handle begin/end michael@0: michael@0: static const struct _cairo_surface_backend cairo_quartz_surface_backend = { michael@0: CAIRO_SURFACE_TYPE_QUARTZ, michael@0: _cairo_quartz_surface_create_similar, michael@0: _cairo_quartz_surface_finish, michael@0: _cairo_quartz_surface_acquire_image, michael@0: _cairo_quartz_surface_release_source_image, michael@0: @@ -3138,17 +3149,17 @@ static const struct _cairo_surface_backe michael@0: NULL, /* create_span_renderer */ michael@0: NULL, /* check_span_renderer */ michael@0: NULL, /* copy_page */ michael@0: NULL, /* show_page */ michael@0: _cairo_quartz_surface_get_extents, michael@0: NULL, /* old_show_glyphs */ michael@0: NULL, /* get_font_options */ michael@0: NULL, /* flush */ michael@0: - NULL, /* mark_dirty_rectangle */ michael@0: + _cairo_quartz_surface_mark_dirty_rectangle, michael@0: NULL, /* scaled_font_fini */ michael@0: NULL, /* scaled_glyph_fini */ michael@0: michael@0: _cairo_quartz_surface_paint, michael@0: _cairo_quartz_surface_mask, michael@0: _cairo_quartz_surface_stroke, michael@0: _cairo_quartz_surface_fill, michael@0: _cairo_quartz_surface_show_glyphs,