mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 15:48:00 +02:00
Remove obsolete _cairo_gstate_set_target_surface, folding its contents into _cairo_gstate_init, most of which disappears due to constant folding. Ensure that gstate->next is initialized even if _cairo_pattern_create_solid fails.
Remove unused _cairo_xcb_surface_set_clip_region.
This commit is contained in:
parent
c56938e568
commit
4914eac983
3 changed files with 15 additions and 64 deletions
11
ChangeLog
11
ChangeLog
|
|
@ -1,3 +1,14 @@
|
|||
2005-06-01 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* src/cairo-gstate.c: (_cairo_gstate_init): Remove obsolete
|
||||
_cairo_gstate_set_target_surface, folding its contents into
|
||||
_cairo_gstate_init, most of which disappears due to constant
|
||||
folding. Ensure that gstate->next is initialized even if
|
||||
_cairo_pattern_create_solid fails.
|
||||
|
||||
* src/cairo-xcb-surface.c: Remove unused
|
||||
_cairo_xcb_surface_set_clip_region.
|
||||
|
||||
2005-06-01 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* src/cairoint.h:
|
||||
|
|
|
|||
|
|
@ -41,10 +41,6 @@
|
|||
|
||||
#include "cairo-gstate-private.h"
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_gstate_set_target_surface (cairo_gstate_t *gstate,
|
||||
cairo_surface_t *surface);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_gstate_clip_and_composite_trapezoids (cairo_gstate_t *gstate,
|
||||
cairo_pattern_t *src,
|
||||
|
|
@ -88,8 +84,6 @@ cairo_status_t
|
|||
_cairo_gstate_init (cairo_gstate_t *gstate,
|
||||
cairo_surface_t *target)
|
||||
{
|
||||
cairo_status_t status;
|
||||
|
||||
gstate->operator = CAIRO_GSTATE_OPERATOR_DEFAULT;
|
||||
|
||||
gstate->tolerance = CAIRO_GSTATE_TOLERANCE_DEFAULT;
|
||||
|
|
@ -120,18 +114,15 @@ _cairo_gstate_init (cairo_gstate_t *gstate,
|
|||
|
||||
_cairo_pen_init_empty (&gstate->pen_regular);
|
||||
|
||||
gstate->target = NULL;
|
||||
gstate->target = target;
|
||||
cairo_surface_reference (gstate->target);
|
||||
|
||||
gstate->next = NULL;
|
||||
|
||||
gstate->source = _cairo_pattern_create_solid (CAIRO_COLOR_BLACK);
|
||||
if (!gstate->source)
|
||||
return CAIRO_STATUS_NO_MEMORY;
|
||||
|
||||
gstate->next = NULL;
|
||||
|
||||
status = _cairo_gstate_set_target_surface (gstate, target);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
@ -327,16 +318,6 @@ _cairo_gstate_end_group (cairo_gstate_t *gstate)
|
|||
}
|
||||
*/
|
||||
|
||||
static cairo_bool_t
|
||||
_cairo_gstate_has_surface_clip (cairo_gstate_t *gstate)
|
||||
{
|
||||
/* check for path clipping here */
|
||||
|
||||
if (gstate->clip.region)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_gstate_set_clip (cairo_gstate_t *gstate)
|
||||
{
|
||||
|
|
@ -389,39 +370,6 @@ _cairo_gstate_get_clip_extents (cairo_gstate_t *gstate,
|
|||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_gstate_set_target_surface (cairo_gstate_t *gstate, cairo_surface_t *surface)
|
||||
{
|
||||
if (gstate->target == surface)
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
||||
/* allocate a new serial to represent our current state. Each
|
||||
surface has its own set of serials */
|
||||
gstate->clip.serial = 0;
|
||||
if (surface && _cairo_gstate_has_surface_clip (gstate))
|
||||
gstate->clip.serial = _cairo_surface_allocate_clip_serial (surface);
|
||||
|
||||
_cairo_gstate_unset_font (gstate);
|
||||
|
||||
if (gstate->target)
|
||||
cairo_surface_destroy (gstate->target);
|
||||
|
||||
gstate->target = surface;
|
||||
|
||||
/* Sometimes the user wants to return to having no target surface,
|
||||
* (just like after cairo_create). This can be useful for forcing
|
||||
* the old surface to be destroyed. */
|
||||
if (surface == NULL) {
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
cairo_surface_reference (gstate->target);
|
||||
|
||||
_cairo_gstate_identity_matrix (gstate);
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
_cairo_gstate_get_target (cairo_gstate_t *gstate)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -980,14 +980,6 @@ _cairo_xcb_surface_composite_trapezoids (cairo_operator_t operator,
|
|||
return status;
|
||||
}
|
||||
|
||||
static cairo_int_status_t
|
||||
_cairo_xcb_surface_set_clip_region (void *abstract_surface,
|
||||
pixman_region16_t *region)
|
||||
{
|
||||
/* XXX: FIXME */
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static cairo_int_status_t
|
||||
_cairo_xcb_surface_get_extents (void *abstract_surface,
|
||||
cairo_rectangle_t *rectangle)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue