mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-28 21:30:42 +01:00
xcb: remove free pixmap/gc wrappers
With the last commit, these became pointless. Just switch the code to call the underlying function directly. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
c16094fc44
commit
009d75b8db
6 changed files with 8 additions and 30 deletions
|
|
@ -52,13 +52,6 @@ _cairo_xcb_connection_create_pixmap (cairo_xcb_connection_t *connection,
|
|||
return pixmap;
|
||||
}
|
||||
|
||||
void
|
||||
_cairo_xcb_connection_free_pixmap (cairo_xcb_connection_t *connection,
|
||||
xcb_pixmap_t pixmap)
|
||||
{
|
||||
xcb_free_pixmap (connection->xcb_connection, pixmap);
|
||||
}
|
||||
|
||||
xcb_gcontext_t
|
||||
_cairo_xcb_connection_create_gc (cairo_xcb_connection_t *connection,
|
||||
xcb_drawable_t drawable,
|
||||
|
|
@ -71,13 +64,6 @@ _cairo_xcb_connection_create_gc (cairo_xcb_connection_t *connection,
|
|||
return gc;
|
||||
}
|
||||
|
||||
void
|
||||
_cairo_xcb_connection_free_gc (cairo_xcb_connection_t *connection,
|
||||
xcb_gcontext_t gc)
|
||||
{
|
||||
xcb_free_gc (connection->xcb_connection, gc);
|
||||
}
|
||||
|
||||
void
|
||||
_cairo_xcb_connection_change_gc (cairo_xcb_connection_t *connection,
|
||||
xcb_gcontext_t gc,
|
||||
|
|
|
|||
|
|
@ -472,20 +472,12 @@ _cairo_xcb_connection_create_pixmap (cairo_xcb_connection_t *connection,
|
|||
uint16_t width,
|
||||
uint16_t height);
|
||||
|
||||
cairo_private void
|
||||
_cairo_xcb_connection_free_pixmap (cairo_xcb_connection_t *connection,
|
||||
xcb_pixmap_t pixmap);
|
||||
|
||||
cairo_private xcb_gcontext_t
|
||||
_cairo_xcb_connection_create_gc (cairo_xcb_connection_t *connection,
|
||||
xcb_drawable_t drawable,
|
||||
uint32_t value_mask,
|
||||
uint32_t *values);
|
||||
|
||||
cairo_private void
|
||||
_cairo_xcb_connection_free_gc (cairo_xcb_connection_t *connection,
|
||||
xcb_gcontext_t gc);
|
||||
|
||||
cairo_private void
|
||||
_cairo_xcb_connection_change_gc (cairo_xcb_connection_t *connection,
|
||||
xcb_gcontext_t gc,
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ _cairo_xcb_screen_finish (cairo_xcb_screen_t *screen)
|
|||
|
||||
for (i = 0; i < ARRAY_LENGTH (screen->gc); i++) {
|
||||
if (screen->gc_depths[i] != 0)
|
||||
_cairo_xcb_connection_free_gc (screen->connection, screen->gc[i]);
|
||||
xcb_free_gc (screen->connection->xcb_connection, screen->gc[i]);
|
||||
}
|
||||
|
||||
_cairo_cache_fini (&screen->linear_pattern_cache);
|
||||
|
|
@ -350,7 +350,7 @@ _cairo_xcb_screen_put_gc (cairo_xcb_screen_t *screen, int depth, xcb_gcontext_t
|
|||
if (i == ARRAY_LENGTH (screen->gc)) {
|
||||
/* perform random substitution to ensure fair caching over depths */
|
||||
i = rand () % ARRAY_LENGTH (screen->gc);
|
||||
_cairo_xcb_connection_free_gc (screen->connection, screen->gc[i]);
|
||||
xcb_free_gc (screen->connection->xcb_connection, screen->gc[i]);
|
||||
}
|
||||
|
||||
screen->gc[i] = gc;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ _cairo_xcb_pixmap_finish (void *abstract_surface)
|
|||
if (unlikely (status))
|
||||
return status;
|
||||
|
||||
_cairo_xcb_connection_free_pixmap (surface->connection,
|
||||
xcb_free_pixmap (surface->connection->xcb_connection,
|
||||
surface->pixmap);
|
||||
_cairo_xcb_connection_release (surface->connection);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ _picture_from_image (cairo_xcb_surface_t *target,
|
|||
0, 0);
|
||||
}
|
||||
|
||||
_cairo_xcb_connection_free_pixmap (target->connection, pixmap);
|
||||
xcb_free_pixmap (target->connection->xcb_connection, pixmap);
|
||||
|
||||
return picture;
|
||||
}
|
||||
|
|
@ -640,7 +640,7 @@ _solid_picture (cairo_xcb_surface_t *target,
|
|||
_cairo_xcb_screen_put_gc (target->screen, 32, gc);
|
||||
}
|
||||
|
||||
_cairo_xcb_connection_free_pixmap (target->connection, pixmap);
|
||||
xcb_free_pixmap (target->connection->xcb_connection, pixmap);
|
||||
}
|
||||
|
||||
return picture;
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ _cairo_xcb_surface_create_similar (void *abstract_other,
|
|||
}
|
||||
|
||||
if (unlikely (surface->base.status))
|
||||
_cairo_xcb_connection_free_pixmap (connection, pixmap);
|
||||
xcb_free_pixmap (connection->xcb_connection, pixmap);
|
||||
|
||||
_cairo_xcb_connection_release (connection);
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ _cairo_xcb_surface_finish (void *abstract_surface)
|
|||
}
|
||||
|
||||
if (surface->owns_pixmap)
|
||||
_cairo_xcb_connection_free_pixmap (surface->connection, surface->drawable);
|
||||
xcb_free_pixmap (surface->connection->xcb_connection, surface->drawable);
|
||||
_cairo_xcb_connection_release (surface->connection);
|
||||
}
|
||||
|
||||
|
|
@ -423,7 +423,7 @@ _get_image (cairo_xcb_surface_t *surface,
|
|||
pixmap,
|
||||
0, 0,
|
||||
width, height);
|
||||
_cairo_xcb_connection_free_pixmap (connection, pixmap);
|
||||
xcb_free_pixmap (connection->xcb_connection, pixmap);
|
||||
}
|
||||
|
||||
if (unlikely (reply == NULL)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue