com php-src: Remove unused _setEdgePixel() and getPix elOverflowColorTC() functions: ext/gd/libgd/gd_inte rpolation.c

From: Date: Tue, 11 Jun 2019 14:59:12 +0000
Subject: com php-src: Remove unused _setEdgePixel() and getPix elOverflowColorTC() functions: ext/gd/libgd/gd_inte rpolation.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106680@lists.php.net to get a copy of this message
Commit: e5411e17c79ff1e555f302e5ad48f58b8a05d086 Author: Nikita Popov <nikita.ppv@gmail.com> Tue, 11 Jun 2019 16:59:12 +0200 Parents: 5c844c1d36fbba8e0a525064b88e86e3d6429b5e Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e5411e17c79ff1e555f302e5ad48f58b8a05d086 Log: Remove unused _setEdgePixel() and getPixelOverflowColorTC() functions Changed paths: M ext/gd/libgd/gd_interpolation.c Diff: diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index 49c8918..357cfa4 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -658,14 +658,6 @@ static inline int _color_blend (const int dst, const int src) } } -static inline int _setEdgePixel(const gdImagePtr src, unsigned int x, unsigned int y, gdFixed coverage, const int bgColor) -{ - const gdFixed f_127 = gd_itofx(127); - register int c = src->tpixels[y][x]; - c = c | (( (int) (gd_fxtof(gd_mulfx(coverage, f_127)) + 50.5f)) << 24); - return _color_blend(bgColor, c); -} - static inline int getPixelOverflowTC(gdImagePtr im, const int x, const int y, const int bgColor) { if (gdImageBoundsSafe(im, x, y)) { @@ -1138,54 +1130,6 @@ gdImagePtr gdImageScaleNearestNeighbour(gdImagePtr im, const unsigned int width, return dst_img; } -static inline int getPixelOverflowColorTC(gdImagePtr im, const int x, const int y, const int color) -{ - if (gdImageBoundsSafe(im, x, y)) { - const int c = im->tpixels[y][x]; - if (c == im->transparent) { - return gdTrueColorAlpha(0, 0, 0, 127); - } - return c; - } else { - register int border = 0; - if (y < im->cy1) { - border = im->tpixels[0][im->cx1]; - goto processborder; - } - - if (y < im->cy1) { - border = im->tpixels[0][im->cx1]; - goto processborder; - } - - if (y > im->cy2) { - if (x >= im->cx1 && x <= im->cx1) { - border = im->tpixels[im->cy2][x]; - goto processborder; - } else { - return gdTrueColorAlpha(0, 0, 0, 127); - } - } - - /* y is bound safe at this point */ - if (x < im->cx1) { - border = im->tpixels[y][im->cx1]; - goto processborder; - } - - if (x > im->cx2) { - border = im->tpixels[y][im->cx2]; - } - -processborder: - if (border == im->transparent) { - return gdTrueColorAlpha(0, 0, 0, 127); - } else{ - return gdTrueColorAlpha(gdTrueColorGetRed(border), gdTrueColorGetGreen(border), gdTrueColorGetBlue(border), 127); - } - } -} - static gdImagePtr gdImageScaleBilinearPalette(gdImagePtr im, const unsigned int new_width, const unsigned int new_height) { long _width = MAX(1, new_width);

« previous php.cvs (#106680) next »