static cairo_int_status_t _cairo_win32_display_surface_unmap_image (void *abstract_surface, cairo_image_surface_t *image) { cairo_win32_display_surface_t *surface = abstract_surface; /* Delay the download until the next flush, which means we also need * to make sure our sources rare flushed. */ TRACE ((stderr, "%s (surface=%d)\n", __FUNCTION__, to_win32_surface(surface)->base.unique_id)); if (surface->fallback) { cairo_rectangle_int_t r; r.x = image->base.device_transform_inverse.x0; r.y = image->base.device_transform_inverse.y0; r.width = image->width; r.height = image->height; TRACE ((stderr, "%s: adding damage (%d,%d)x(%d,%d)\n", __FUNCTION__, r.x, r.y, r.width, r.height)); surface->fallback->damage = _cairo_damage_add_rectangle (surface->fallback->damage, &r); surface = to_win32_display_surface (surface->fallback); } return _cairo_surface_unmap_image (surface->image, image); }
cairo_int_status_t _cairo_compositor_stroke (const cairo_compositor_t *compositor, cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, const cairo_path_fixed_t *path, const cairo_stroke_style_t *style, const cairo_matrix_t *ctm, const cairo_matrix_t *ctm_inverse, double tolerance, cairo_antialias_t antialias, const cairo_clip_t *clip) { cairo_composite_rectangles_t extents; cairo_int_status_t status; TRACE ((stderr, "%s\n", __FUNCTION__)); if (_cairo_pen_vertices_needed (tolerance, style->line_width/2, ctm) <= 1) return CAIRO_INT_STATUS_NOTHING_TO_DO; status = _cairo_composite_rectangles_init_for_stroke (&extents, surface, op, source, path, style, ctm, clip); if (unlikely (status)) return status; do { while (compositor->stroke == XNULL) compositor = compositor->delegate; status = compositor->stroke (compositor, &extents, path, style, ctm, ctm_inverse, tolerance, antialias); compositor = compositor->delegate; } while (status == CAIRO_INT_STATUS_UNSUPPORTED); if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) { TRACE ((stderr, "%s: applying damage (%d,%d)x(%d, %d)\n", __FUNCTION__, extents.unbounded.x, extents.unbounded.y, extents.unbounded.width, extents.unbounded.height)); surface->damage = _cairo_damage_add_rectangle (surface->damage, &extents.unbounded); } _cairo_composite_rectangles_fini (&extents); return status; }
cairo_int_status_t _cairo_compositor_glyphs (const cairo_compositor_t *compositor, cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, cairo_glyph_t *glyphs, int num_glyphs, cairo_scaled_font_t *scaled_font, const cairo_clip_t *clip) { cairo_composite_rectangles_t extents; cairo_bool_t overlap; cairo_int_status_t status; TRACE ((stderr, "%s\n", __FUNCTION__)); status = _cairo_composite_rectangles_init_for_glyphs (&extents, surface, op, source, scaled_font, glyphs, num_glyphs, clip, &overlap); if (unlikely (status)) return status; do { while (compositor->glyphs == NULL) compositor = compositor->delegate; status = compositor->glyphs (compositor, &extents, scaled_font, glyphs, num_glyphs, overlap); compositor = compositor->delegate; } while (status == CAIRO_INT_STATUS_UNSUPPORTED); if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) { TRACE ((stderr, "%s: applying damage (%d,%d)x(%d, %d)\n", __FUNCTION__, extents.unbounded.x, extents.unbounded.y, extents.unbounded.width, extents.unbounded.height)); surface->damage = _cairo_damage_add_rectangle (surface->damage, &extents.unbounded); } _cairo_composite_rectangles_fini (&extents); return status; }
cairo_int_status_t _cairo_compositor_fill (const cairo_compositor_t *compositor, cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, const cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, double tolerance, cairo_antialias_t antialias, const cairo_clip_t *clip) { cairo_composite_rectangles_t extents; cairo_int_status_t status; TRACE ((stderr, "%s\n", __FUNCTION__)); status = _cairo_composite_rectangles_init_for_fill (&extents, surface, op, source, path, clip); if (unlikely (status)) return status; do { while (compositor->fill == XNULL) compositor = compositor->delegate; status = compositor->fill (compositor, &extents, path, fill_rule, tolerance, antialias); compositor = compositor->delegate; } while (status == CAIRO_INT_STATUS_UNSUPPORTED); if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) { TRACE ((stderr, "%s: applying damage (%d,%d)x(%d, %d)\n", __FUNCTION__, extents.unbounded.x, extents.unbounded.y, extents.unbounded.width, extents.unbounded.height)); surface->damage = _cairo_damage_add_rectangle (surface->damage, &extents.unbounded); } _cairo_composite_rectangles_fini (&extents); return status; }