]> granicus.if.org Git - php/commitdiff
Remove unused _setEdgePixel() and getPixelOverflowColorTC() functions
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 11 Jun 2019 14:59:12 +0000 (16:59 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 11 Jun 2019 14:59:12 +0000 (16:59 +0200)
ext/gd/libgd/gd_interpolation.c

index 49c8918e3f1ae8d21e9117614fac45ecc0505dc7..357cfa47bd7be314a3c781f9798ee8044de6e169 100644 (file)
@@ -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);