From: suhyung Eom Date: Tue, 31 May 2016 08:57:27 +0000 (+0900) Subject: Revert "[3.0] Change 'char' type to 'signed char'" X-Git-Tag: accepted/tizen/common/20160613.144828~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad070ad5c06fed7558654c544420566e66902b88;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Revert "[3.0] Change 'char' type to 'signed char'" This reverts commit af6ff4a3555b226f518b5c8fa4e3754298f21cb3. Change-Id: I7246c1c0868041bf1814be425afa09f641f2b152 --- diff --git a/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvg.cc b/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvg.cc index 9643567..e52cb15 100644 --- a/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvg.cc +++ b/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvg.cc @@ -230,25 +230,13 @@ typedef struct NSVGgradientData { char id[64]; char ref[64]; - - /** - * 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 type; union { NSVGlinearData linear; NSVGradialData radial; }; char spread; - - /** - * 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 units' with 'signed char units' here. - */ - signed char units; + char units; float xform[6]; int nstops; NSVGgradientStop* stops; @@ -655,12 +643,7 @@ static NSVGgradientData* nsvg__findGradientData(NSVGparser* p, const char* id) return NULL; } -/** - * 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 paintType' with 'signed char paintType' here. - */ -static NSVGgradient* nsvg__createGradient(NSVGparser* p, const char* id, const float* localBounds, signed char* paintType) +static NSVGgradient* nsvg__createGradient(NSVGparser* p, const char* id, const float* localBounds, char* paintType) { NSVGattrib* attr = nsvg__getAttr(p); NSVGgradientData* data = NULL; diff --git a/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvg.h b/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvg.h index 2634297..608bcd6 100644 --- a/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvg.h +++ b/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvg.h @@ -113,12 +113,7 @@ typedef struct NSVGgradient { } NSVGgradient; typedef struct NSVGpaint { - /** - * 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 type; union { unsigned int color; NSVGgradient* gradient; diff --git a/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvgrast.cc b/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvgrast.cc index a6c843e..73bfd2c 100644 --- a/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvgrast.cc +++ b/dali-toolkit/internal/controls/renderers/svg/nanosvg/nanosvgrast.cc @@ -68,12 +68,7 @@ typedef struct NSVGmemPage { } NSVGmemPage; typedef struct NSVGcachedPaint { - /** - * 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 type; char spread; float xform[6]; unsigned int colors[256]; @@ -878,12 +873,7 @@ 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 -/** - * 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) +static void nsvg__fillActiveEdges(unsigned char* scanline, int len, NSVGactiveEdge* e, int maxWeight, int* xmin, int* xmax, char fillRule) { // non-zero winding fill int x0 = 0, w = 0;