cleanup in preview code
This commit is contained in:
parent
9588a859da
commit
4322101f9b
|
|
@ -201,7 +201,6 @@ static void reset_cairo(int create, int clear)
|
|||
/* save_sfc is based on pixmap and pixmaps are not resizeable, so on resize
|
||||
* we must destroy & recreate everything. sfc can be resized using cairo_*_surface_set_size
|
||||
* being based on window */
|
||||
cairo_destroy(cairo_save_ctx);
|
||||
cairo_surface_destroy(save_sfc);
|
||||
#if HAS_XRENDER==1
|
||||
#if HAS_XCB==1
|
||||
|
|
@ -218,7 +217,6 @@ static void reset_cairo(int create, int clear)
|
|||
fprintf(errfp, "ERROR: invalid cairo xcb surface\n");
|
||||
exit(-1);
|
||||
}
|
||||
cairo_save_ctx = cairo_create(save_sfc);
|
||||
cairo_set_line_width(cairo_save_ctx, 1);
|
||||
cairo_set_line_join(cairo_save_ctx, CAIRO_LINE_JOIN_ROUND);
|
||||
cairo_set_line_cap(cairo_save_ctx, CAIRO_LINE_CAP_ROUND);
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ void print_image()
|
|||
XSetTile(display, gctiled, xctx->save_pixmap);
|
||||
|
||||
#ifdef HAS_CAIRO
|
||||
cairo_destroy(cairo_save_ctx);
|
||||
cairo_surface_destroy(save_sfc);
|
||||
|
||||
#if HAS_XRENDER==1
|
||||
|
|
@ -125,7 +124,6 @@ void print_image()
|
|||
fprintf(errfp, "ERROR: invalid cairo xcb surface\n");
|
||||
exit(-1);
|
||||
}
|
||||
cairo_save_ctx = cairo_create(save_sfc);
|
||||
cairo_set_line_width(cairo_save_ctx, 1);
|
||||
cairo_set_line_join(cairo_save_ctx, CAIRO_LINE_JOIN_ROUND);
|
||||
cairo_set_line_cap(cairo_save_ctx, CAIRO_LINE_CAP_ROUND);
|
||||
|
|
@ -184,7 +182,6 @@ void print_image()
|
|||
|
||||
|
||||
#ifdef HAS_CAIRO
|
||||
cairo_destroy(cairo_save_ctx);
|
||||
cairo_surface_destroy(save_sfc);
|
||||
|
||||
#if HAS_XRENDER==1
|
||||
|
|
@ -201,7 +198,6 @@ void print_image()
|
|||
fprintf(errfp, "ERROR: invalid cairo xcb surface\n");
|
||||
exit(-1);
|
||||
}
|
||||
cairo_save_ctx = cairo_create(save_sfc);
|
||||
cairo_set_line_width(cairo_save_ctx, 1);
|
||||
cairo_set_line_join(cairo_save_ctx, CAIRO_LINE_JOIN_ROUND);
|
||||
cairo_set_line_cap(cairo_save_ctx, CAIRO_LINE_CAP_ROUND);
|
||||
|
|
|
|||
|
|
@ -636,7 +636,6 @@ void xwin_exit(void)
|
|||
if(has_x) {
|
||||
#ifdef HAS_CAIRO
|
||||
cairo_destroy(cairo_ctx);
|
||||
cairo_destroy(cairo_save_ctx);
|
||||
cairo_surface_destroy(sfc);
|
||||
cairo_surface_destroy(save_sfc);
|
||||
#endif
|
||||
|
|
@ -1384,7 +1383,7 @@ int Tcl_AppInit(Tcl_Interp *inter)
|
|||
return 1;
|
||||
}
|
||||
cairo_ctx = cairo_create(sfc);
|
||||
cairo_save_ctx = cairo_create(save_sfc);
|
||||
cairo_save_ctx = cairo_ctx;
|
||||
|
||||
#if 0
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue