From: H.G. Muller Date: Fri, 5 Oct 2012 16:59:30 +0000 (+0200) Subject: Remove acceleration trick X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=61b69f49dbec48869a2aba5e982a79087c226b7a;p=xboard.git Remove acceleration trick --- diff --git a/xboard.c b/xboard.c index 4d12241..a0fa610 100644 --- a/xboard.c +++ b/xboard.c @@ -4146,14 +4146,17 @@ CairoOverlayPiece (ChessSquare piece, cairo_surface_t *dest) static int oldSize; static cairo_t *pieceSource; extern int doubleClick; // in backend.c - if(piece != oldPiece || squareSize != oldSize) { // try make it faster by only changing cr if we need other piece - if(pieceSource) cairo_destroy (pieceSource); - pieceSource = cairo_create (dest); - cairo_set_source_surface (pieceSource, pngPieceBitmaps[!White(piece)][piece % BlackPawn], 0, 0); - oldPiece = piece; oldSize = squareSize; - } +// if(piece != oldPiece || squareSize != oldSize) { // try make it faster by only changing cr if we need other piece +// if(pieceSource) cairo_destroy (pieceSource); +// pieceSource = cairo_create (dest); +// cairo_set_source_surface (pieceSource, pngPieceBitmaps[!White(piece)][piece % BlackPawn], 0, 0); +// oldPiece = piece; oldSize = squareSize; +// } + pieceSource = cairo_create (dest); + cairo_set_source_surface (pieceSource, pngPieceBitmaps[!White(piece)][piece % BlackPawn], 0, 0); if(doubleClick) cairo_paint_with_alpha (pieceSource, 0.6); else cairo_paint(pieceSource); + cairo_destroy (pieceSource); } void