X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Frenderers%2Fsvg%2Fnanosvg%2Fnanosvgrast.cc;h=a3f3bdb811a1738b92bed8ce634ee8ff1767f618;hp=73bfd2c927316f65e31110178eeb996edf3ecb52;hb=refs%2Fchanges%2F97%2F68897%2F4;hpb=f0a1f6b7d49f14dc3ffb6de99668d2084c31ebf5 diff --git a/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvgrast.cc b/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvgrast.cc index 73bfd2c..a3f3bdb 100644 --- a/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvgrast.cc +++ b/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvgrast.cc @@ -68,7 +68,12 @@ typedef struct NSVGmemPage { } NSVGmemPage; typedef struct NSVGcachedPaint { - char type; + /** + * In the original file, using char type (without signed or unsigned) can be interpreted + * as 'unsigned char' in some build environments, like ARM architecture. + * To prevent the unexpected behavior, we replace 'char type' with 'signed char type' here. + */ + signed char type; char spread; float xform[6]; unsigned int colors[256]; @@ -873,7 +878,13 @@ static void nsvg__fillScanline(unsigned char* scanline, int len, int x0, int x1, // note: this routine clips fills that extend off the edges... ideally this // wouldn't happen, but it could happen if the truetype glyph bounding boxes // are wrong, or if the user supplies a too-small bitmap -static void nsvg__fillActiveEdges(unsigned char* scanline, int len, NSVGactiveEdge* e, int maxWeight, int* xmin, int* xmax, char fillRule) + + /** + * In the original file, using char type (without signed or unsigned) can be interpreted + * as 'unsigned char' in some build environments, like ARM architecture. + * To prevent the unexpected behavior, we replace 'char fillRule' with 'signed char fillRule' here. + */ +static void nsvg__fillActiveEdges(unsigned char* scanline, int len, NSVGactiveEdge* e, int maxWeight, int* xmin, int* xmax, signed char fillRule) { // non-zero winding fill int x0 = 0, w = 0;