1 # HG changeset patch |
1 # HG changeset patch |
2 # User Steve Singer <steve@ssinger.info> |
2 # User Steve Singer <steve@ssinger.info> |
3 # Date 1558451540 -7200 |
3 # Date 1558451540 -7200 |
4 # Tue May 21 17:12:20 2019 +0200 |
4 # Tue May 21 17:12:20 2019 +0200 |
5 # Node ID 433beec63e6b5f409683af20a0c1ab137cc7bfad |
5 # Node ID 433beec63e6b5f409683af20a0c1ab137cc7bfad |
6 # Parent 0b9b94a6526d4f1aa6e23b95c1f5f7c0bef841a7 |
6 # Parent c0fdccc716e80a6d289c94f5d507ae141c62a3bf |
7 Bug 1005535 - Get skia GPU building on big endian. |
7 Bug 1005535 - Get skia GPU building on big endian. |
8 |
8 |
9 diff -r 0b9b94a6526d gfx/skia/skia/src/gpu/GrColor.h |
9 diff --git a/gfx/skia/skia/src/gpu/GrColor.h b/gfx/skia/skia/src/gpu/GrColor.h |
10 --- a/gfx/skia/skia/src/gpu/GrColor.h Tue May 21 17:26:58 2019 +0200 |
10 --- a/gfx/skia/skia/src/gpu/GrColor.h |
11 +++ b/gfx/skia/skia/src/gpu/GrColor.h Wed Jan 08 12:14:52 2020 +0100 |
11 +++ b/gfx/skia/skia/src/gpu/GrColor.h |
12 @@ -64,7 +64,7 @@ |
12 @@ -59,17 +59,17 @@ static inline GrColor GrColorPackRGBA(un |
|
13 #define GrColorUnpackG(color) (((color) >> GrColor_SHIFT_G) & 0xFF) |
|
14 #define GrColorUnpackB(color) (((color) >> GrColor_SHIFT_B) & 0xFF) |
|
15 #define GrColorUnpackA(color) (((color) >> GrColor_SHIFT_A) & 0xFF) |
|
16 |
|
17 /** |
13 * Since premultiplied means that alpha >= color, we construct a color with |
18 * Since premultiplied means that alpha >= color, we construct a color with |
14 * each component==255 and alpha == 0 to be "illegal" |
19 * each component==255 and alpha == 0 to be "illegal" |
15 */ |
20 */ |
16 -#define GrColor_ILLEGAL (~(0xFF << GrColor_SHIFT_A)) |
21 -#define GrColor_ILLEGAL (~(0xFF << GrColor_SHIFT_A)) |
17 +#define GrColor_ILLEGAL ((uint32_t)(~(0xFF << GrColor_SHIFT_A))) |
22 +#define GrColor_ILLEGAL ((uint32_t)(~(0xFF << GrColor_SHIFT_A))) |
18 |
23 |
19 /** Normalizes and coverts an uint8_t to a float. [0, 255] -> [0.0, 1.0] */ |
24 /** Normalizes and coverts an uint8_t to a float. [0, 255] -> [0.0, 1.0] */ |
20 static inline float GrNormalizeByteToFloat(uint8_t value) { |
25 static inline float GrNormalizeByteToFloat(uint8_t value) { |
|
26 static const float ONE_OVER_255 = 1.f / 255.f; |
|
27 return value * ONE_OVER_255; |
|
28 } |
|
29 |
|
30 /** Used to pick vertex attribute types. */ |