mozilla-bmo1005535.patch
branchfirefox116
changeset 1191 37e065158be7
parent 1190 2a24a948b5cf
child 1192 7612b8d8c46f
equal deleted inserted replaced
1190:2a24a948b5cf 1191:37e065158be7
     1 # HG changeset patch
       
     2 # User Steve Singer <steve@ssinger.info>
       
     3 # Date 1558451540 -7200
       
     4 #      Tue May 21 17:12:20 2019 +0200
       
     5 # Node ID 433beec63e6b5f409683af20a0c1ab137cc7bfad
       
     6 # Parent  c0fdccc716e80a6d289c94f5d507ae141c62a3bf
       
     7 Bug 1005535 - Get skia GPU building on big endian.
       
     8 
       
     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
       
    11 +++ b/gfx/skia/skia/src/gpu/GrColor.h
       
    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  /**
       
    18   *  Since premultiplied means that alpha >= color, we construct a color with
       
    19   *  each component==255 and alpha == 0 to be "illegal"
       
    20   */
       
    21 -#define GrColor_ILLEGAL     (~(0xFF << GrColor_SHIFT_A))
       
    22 +#define GrColor_ILLEGAL     ((uint32_t)(~(0xFF << GrColor_SHIFT_A)))
       
    23  
       
    24  /** Normalizes and coverts an uint8_t to a float. [0, 255] -> [0.0, 1.0] */
       
    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. */