From: H.G. Muller Date: Wed, 10 Oct 2012 15:19:52 +0000 (+0200) Subject: remove NewSurfaces X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=3244186ba7abe670ba7bc8284119fa008197ae99;p=xboard.git remove NewSurfaces --- diff --git a/draw.c b/draw.c index 45a332c..34b525c 100644 --- a/draw.c +++ b/draw.c @@ -141,17 +141,6 @@ SwitchWindow () csDualBoard = cstmp; } -void -NewSurfaces () -{ -return; - // delete surfaces after size becomes invalid, so they will be recreated - if(csBoardWindow) cairo_surface_destroy(csBoardWindow); - if(csBoardBackup) cairo_surface_destroy(csBoardBackup); - if(csDualBoard) cairo_surface_destroy(csDualBoard); - csBoardWindow = csBoardBackup = csDualBoard = NULL; -} - #define BoardSize int void InitDrawingSizes (BoardSize boardSize, int flags) @@ -176,7 +165,6 @@ InitDrawingSizes (BoardSize boardSize, int flags) oldWidth = boardWidth; oldHeight = boardHeight; CreateGrid(); - NewSurfaces(); /* * Inhibit shell resizing. diff --git a/xboard.c b/xboard.c index 54f9953..1d0de9f 100644 --- a/xboard.c +++ b/xboard.c @@ -1745,7 +1745,6 @@ ReSize (WindowPlacement *wp) if(sqy < sqx) sqx = sqy; if(sqx != squareSize) { squareSize = sqx; // adopt new square size - NewSurfaces(); CreatePNGPieces(); // make newly scaled pieces InitDrawingSizes(0, 0); // creates grid etc. } else ResizeBoardWindow(BOARD_WIDTH * (squareSize + lineGap) + lineGap, BOARD_HEIGHT * (squareSize + lineGap) + lineGap, 0);