Commit 549b1f8d authored by Andrea Canciani's avatar Andrea Canciani

boilerplate: Remove unused thread id parameter

The thread id is not used anymore (it is always == 0), so it can be
removed.
parent b07b2422
......@@ -66,7 +66,6 @@ _cairo_boilerplate_cogl_create_offscreen_color_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **abstract_closure)
{
cairo_device_t *device;
......@@ -116,7 +115,6 @@ _cairo_boilerplate_cogl_create_onscreen_color_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **abstract_closure)
{
cairo_device_t *device;
......
......@@ -175,7 +175,6 @@ _cairo_boilerplate_directfb_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
......
......@@ -42,7 +42,6 @@ _cairo_boilerplate_drm_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
cairo_device_t *device;
......
......@@ -72,7 +72,6 @@ _cairo_boilerplate_egl_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
egl_target_closure_t *gltc;
......
......@@ -74,7 +74,6 @@ _cairo_boilerplate_gl_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
int rgba_attribs[] = { GLX_RGBA,
......@@ -151,7 +150,6 @@ _cairo_boilerplate_gl_create_window (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
int rgba_attribs[] = { GLX_RGBA,
......@@ -232,7 +230,6 @@ _cairo_boilerplate_gl_create_window_db (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
int rgba_attribs[] = { GLX_RGBA,
......
......@@ -64,7 +64,6 @@ _cairo_boilerplate_pdf_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
pdf_target_closure_t *ptc;
......
......@@ -82,7 +82,6 @@ _cairo_boilerplate_ps_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
ps_target_closure_t *ptc;
......@@ -144,14 +143,13 @@ _cairo_boilerplate_ps2_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
return _cairo_boilerplate_ps_create_surface (name, content,
CAIRO_PS_LEVEL_2,
width, height,
max_width, max_height,
mode, id,
mode,
closure);
}
......@@ -163,14 +161,13 @@ _cairo_boilerplate_ps3_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
return _cairo_boilerplate_ps_create_surface (name, content,
CAIRO_PS_LEVEL_3,
width, height,
max_width, max_height,
mode, id,
mode,
closure);
}
......
......@@ -60,7 +60,6 @@ _cairo_boilerplate_qt_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
qt_closure_t *qtc;
......
......@@ -36,7 +36,6 @@ _cairo_boilerplate_quartz_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
cairo_format_t format;
......
......@@ -44,7 +44,6 @@ _cairo_boilerplate_script_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
script_target_closure_t *ptc;
......
......@@ -11,7 +11,6 @@ _cairo_boilerplate_skia_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
cairo_format_t format;
......
......@@ -62,7 +62,6 @@ _cairo_boilerplate_svg_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
svg_target_closure_t *ptc;
......@@ -117,7 +116,6 @@ _cairo_boilerplate_svg11_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
/* current default, but be explicit in case the default changes */
......@@ -125,7 +123,7 @@ _cairo_boilerplate_svg11_create_surface (const char *name,
CAIRO_SVG_VERSION_1_1,
width, height,
max_width, max_height,
mode, id,
mode,
closure);
}
......@@ -137,14 +135,13 @@ _cairo_boilerplate_svg12_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
return _cairo_boilerplate_svg_create_surface (name, content,
CAIRO_SVG_VERSION_1_2,
width, height,
max_width, max_height,
mode, id,
mode,
closure);
}
......
......@@ -44,7 +44,6 @@ _cairo_boilerplate_test_base_compositor_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
*closure = NULL;
......@@ -60,7 +59,6 @@ _cairo_boilerplate_test_fallback_compositor_create_surface (const char *name
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
*closure = NULL;
......@@ -75,7 +73,6 @@ _cairo_boilerplate_test_mask_compositor_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
*closure = NULL;
......@@ -91,7 +88,6 @@ _cairo_boilerplate_test_traps_compositor_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
*closure = NULL;
......@@ -106,7 +102,6 @@ _cairo_boilerplate_test_spans_compositor_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
*closure = NULL;
......@@ -121,7 +116,6 @@ _cairo_boilerplate_test_no_fallback_compositor_create_surface (const char *n
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
if (mode == CAIRO_BOILERPLATE_MODE_TEST)
......@@ -139,7 +133,6 @@ _cairo_boilerplate_test_no_traps_compositor_create_surface (const char *name
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
if (mode == CAIRO_BOILERPLATE_MODE_TEST)
......@@ -157,7 +150,6 @@ _cairo_boilerplate_test_no_spans_compositor_create_surface (const char *name
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
if (mode == CAIRO_BOILERPLATE_MODE_TEST)
......@@ -182,7 +174,6 @@ _cairo_boilerplate_test_paginated_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
test_paginated_closure_t *tpc;
......
......@@ -78,7 +78,6 @@ _cairo_boilerplate_vg_create_surface_glx (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
int rgba_attribs[] = {
......@@ -207,7 +206,6 @@ _cairo_boilerplate_vg_create_surface_egl (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
int rgba_attribs[] = {
......
......@@ -109,7 +109,6 @@ _cairo_boilerplate_wgl_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
wgl_target_closure_t *wgltc;
......@@ -146,7 +145,6 @@ _cairo_boilerplate_wgl_for_create_window (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
wgl_target_closure_t *wgltc;
......
......@@ -169,7 +169,6 @@ _cairo_boilerplate_win32_printing_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
win32_target_closure_t *ptc;
......
......@@ -36,7 +36,6 @@ _cairo_boilerplate_win32_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
cairo_format_t format;
......
......@@ -245,7 +245,6 @@ _cairo_boilerplate_xcb_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
xcb_screen_t *root;
......@@ -394,7 +393,6 @@ _cairo_boilerplate_xcb_create_window (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
xcb_target_closure_t *xtc;
......@@ -471,7 +469,6 @@ _cairo_boilerplate_xcb_create_window_db (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
xcb_target_closure_t *xtc;
......@@ -549,7 +546,6 @@ _cairo_boilerplate_xcb_create_render_0_0 (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
xcb_screen_t *root;
......@@ -651,7 +647,6 @@ _cairo_boilerplate_xcb_create_fallback (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
xcb_target_closure_t *xtc;
......
......@@ -280,7 +280,6 @@ _cairo_boilerplate_xlib_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
xlib_target_closure_t *xtc;
......@@ -323,13 +322,11 @@ _cairo_boilerplate_xlib_window_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
xlib_target_closure_t *xtc;
Display *dpy;
Screen *scr;
int screen, x, y;
int screen;
XSetWindowAttributes attr;
cairo_surface_t *surface;
......@@ -374,25 +371,9 @@ _cairo_boilerplate_xlib_window_create_surface (const char *name,
return NULL;
}
/* tile the windows so threads do not overlap */
scr = XScreenOfDisplay (dpy, screen);
x = 10; y = 15;
if (id-- > 1) do {
x += max_width;
if (x + max_width > WidthOfScreen (scr)) {
x = 10;
y += max_height;
if (y + max_height > HeightOfScreen (scr)) {
XCloseDisplay (dpy);
free (xtc);
return NULL;
}
}
} while (--id);
attr.override_redirect = True;
xtc->drawable = XCreateWindow (dpy, DefaultRootWindow (dpy),
x, y,
0, 0,
width, height, 0,
DefaultDepth (dpy, screen),
InputOutput,
......@@ -475,13 +456,11 @@ _cairo_boilerplate_xlib_fallback_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
xlib_target_closure_t *xtc;
Display *dpy;
Screen *scr;
int screen, x, y;
int screen;
XSetWindowAttributes attr;
cairo_surface_t *surface;
......@@ -526,25 +505,9 @@ _cairo_boilerplate_xlib_fallback_create_surface (const char *name,
return NULL;
}
/* tile the windows so threads do not overlap */
scr = XScreenOfDisplay (dpy, screen);
x = y = 0;
if (id-- > 1) do {
x += max_width;
if (x + max_width > WidthOfScreen (scr)) {
x = 0;
y += max_height;
if (y + max_height > HeightOfScreen (scr)) {
XCloseDisplay (dpy);
free (xtc);
return NULL;
}
}
} while (--id);
attr.override_redirect = True;
xtc->drawable = XCreateWindow (dpy, DefaultRootWindow (dpy),
x, y,
0, 0,
width, height, 0,
DefaultDepth (dpy, screen),
InputOutput,
......
......@@ -132,7 +132,6 @@ _cairo_boilerplate_image_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
cairo_format_t format;
......@@ -188,7 +187,6 @@ _cairo_boilerplate_image16_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
*closure = NULL;
......@@ -243,7 +241,6 @@ _cairo_boilerplate_recording_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure)
{
cairo_rectangle_t extents;
......
......@@ -124,7 +124,6 @@ typedef cairo_surface_t *
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
int id,
void **closure);
typedef cairo_surface_t *
......
......@@ -418,7 +418,6 @@ cairo_perf_trace (cairo_perf_t *perf,
1, 1,
1, 1,
CAIRO_BOILERPLATE_MODE_PERF,
0,
&args.closure);
args.surface =
cairo_surface_create_observer (real,
......
......@@ -508,7 +508,6 @@ main (int argc,
perf.size, perf.size,
perf.size, perf.size,
CAIRO_BOILERPLATE_MODE_PERF,
0,
&closure);
if (surface == NULL) {
fprintf (stderr,
......
......@@ -699,7 +699,6 @@ cairo_perf_trace (cairo_perf_t *perf,
1, 1,
1, 1,
CAIRO_BOILERPLATE_MODE_PERF,
0,
&args.closure);
if (perf->observe) {
cairo_surface_t *obs;
......
......@@ -591,7 +591,6 @@ spawn_target (const char *socket_path,
1, 1,
1, 1,
CAIRO_BOILERPLATE_MODE_TEST,
0,
&tr.closure);
if (tr.surface == NULL) {
fprintf (stderr,
......
......@@ -436,7 +436,6 @@ cairo_test_target_has_similar (const cairo_test_context_t *ctx,
ctx->test->width + 25 * NUM_DEVICE_OFFSETS,
ctx->test->height + 25 * NUM_DEVICE_OFFSETS,
CAIRO_BOILERPLATE_MODE_TEST,
0,
&closure);
if (surface == NULL)
goto out;
......@@ -821,7 +820,6 @@ REPEAT:
ctx->test->width + 25 * NUM_DEVICE_OFFSETS,
ctx->test->height + 25 * NUM_DEVICE_OFFSETS,
CAIRO_BOILERPLATE_MODE_TEST,
0,
&closure);
if (surface == NULL) {
cairo_test_log (ctx, "Error: Failed to set %s target\n", target->name);
......
......@@ -382,7 +382,6 @@ preamble (cairo_test_context_t *ctx)
SIZE, SIZE,
SIZE, SIZE,
CAIRO_BOILERPLATE_MODE_TEST,
0,
&closure);
if (surface == NULL) {
......@@ -417,7 +416,6 @@ preamble (cairo_test_context_t *ctx)
SIZE + 25, SIZE + 25,
SIZE + 25, SIZE + 25,
CAIRO_BOILERPLATE_MODE_TEST,
0,
&closure);
if (surface == NULL || cairo_surface_status (surface)) {
cairo_test_log (ctx, "Failed to generate surface: %s.%s\n",
......
......@@ -288,7 +288,6 @@ preamble (cairo_test_context_t *ctx)
WIDTH, HEIGHT,
WIDTH, HEIGHT,
CAIRO_BOILERPLATE_MODE_TEST,
0,
&closure);
if (surface == NULL) {
......
......@@ -1378,7 +1378,7 @@ do_client (int fd,
client.surface = client.target->create_surface (NULL, content, 1, 1, 1, 1,
CAIRO_BOILERPLATE_MODE_TEST,
0, &closure);
&closure);
if (client.surface == NULL) {
fprintf (stderr, "Failed to create target surface: %s.\n",
client.target->name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment