tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

0002-Bug-848491-Re-apply-Bug-795549-Move-TileProc-functio.patch (1428B)


      1 From: George Wright <george@mozilla.com>
      2 Date: Mon, 14 Jan 2013 17:59:09 -0500
      3 Subject: Bug 848491 - Re-apply Bug 795549 - Move TileProc functions into their own file to ensure they only exist once in a library
      4 
      5 
      6 diff --git a/gfx/skia/src/effects/gradients/SkGradientShaderPriv.h b/gfx/skia/src/effects/gradients/SkGradientShaderPriv.h
      7 index b9dbf1b..729ce4e 100644
      8 --- a/gfx/skia/src/effects/gradients/SkGradientShaderPriv.h
      9 +++ b/gfx/skia/src/effects/gradients/SkGradientShaderPriv.h
     10 @@ -37,34 +37,9 @@ static inline void sk_memset32_dither(uint32_t dst[], uint32_t v0, uint32_t v1,
     11     }
     12 }
     13 
     14 -//  Clamp
     15 -
     16 -static inline SkFixed clamp_tileproc(SkFixed x) {
     17 -    return SkClampMax(x, 0xFFFF);
     18 -}
     19 -
     20 -// Repeat
     21 -
     22 -static inline SkFixed repeat_tileproc(SkFixed x) {
     23 -    return x & 0xFFFF;
     24 -}
     25 -
     26 -// Mirror
     27 -
     28 -// Visual Studio 2010 (MSC_VER=1600) optimizes bit-shift code incorrectly.
     29 -// See http://code.google.com/p/skia/issues/detail?id=472
     30 -#if defined(_MSC_VER) && (_MSC_VER >= 1600)
     31 -#pragma optimize("", off)
     32 -#endif
     33 -
     34 -static inline SkFixed mirror_tileproc(SkFixed x) {
     35 -    int s = x << 15 >> 31;
     36 -    return (x ^ s) & 0xFFFF;
     37 -}
     38 -
     39 -#if defined(_MSC_VER) && (_MSC_VER >= 1600)
     40 -#pragma optimize("", on)
     41 -#endif
     42 +SkFixed clamp_tileproc(SkFixed x);
     43 +SkFixed repeat_tileproc(SkFixed x);
     44 +SkFixed mirror_tileproc(SkFixed x);
     45 
     46 ///////////////////////////////////////////////////////////////////////////////
     47 
     48 -- 
     49 1.7.11.7