gfx/skia/patches/0002-Bug-848491-Re-apply-Bug-795549-Move-TileProc-functio.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/patches/0002-Bug-848491-Re-apply-Bug-795549-Move-TileProc-functio.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,50 @@
     1.4 +From: George Wright <george@mozilla.com>
     1.5 +Date: Mon, 14 Jan 2013 17:59:09 -0500
     1.6 +Subject: Bug 848491 - Re-apply Bug 795549 - Move TileProc functions into their own file to ensure they only exist once in a library
     1.7 +
     1.8 +
     1.9 +diff --git a/gfx/skia/src/effects/gradients/SkGradientShaderPriv.h b/gfx/skia/src/effects/gradients/SkGradientShaderPriv.h
    1.10 +index b9dbf1b..729ce4e 100644
    1.11 +--- a/gfx/skia/src/effects/gradients/SkGradientShaderPriv.h
    1.12 ++++ b/gfx/skia/src/effects/gradients/SkGradientShaderPriv.h
    1.13 +@@ -37,34 +37,9 @@ static inline void sk_memset32_dither(uint32_t dst[], uint32_t v0, uint32_t v1,
    1.14 +     }
    1.15 + }
    1.16 + 
    1.17 +-//  Clamp
    1.18 +-
    1.19 +-static inline SkFixed clamp_tileproc(SkFixed x) {
    1.20 +-    return SkClampMax(x, 0xFFFF);
    1.21 +-}
    1.22 +-
    1.23 +-// Repeat
    1.24 +-
    1.25 +-static inline SkFixed repeat_tileproc(SkFixed x) {
    1.26 +-    return x & 0xFFFF;
    1.27 +-}
    1.28 +-
    1.29 +-// Mirror
    1.30 +-
    1.31 +-// Visual Studio 2010 (MSC_VER=1600) optimizes bit-shift code incorrectly.
    1.32 +-// See http://code.google.com/p/skia/issues/detail?id=472
    1.33 +-#if defined(_MSC_VER) && (_MSC_VER >= 1600)
    1.34 +-#pragma optimize("", off)
    1.35 +-#endif
    1.36 +-
    1.37 +-static inline SkFixed mirror_tileproc(SkFixed x) {
    1.38 +-    int s = x << 15 >> 31;
    1.39 +-    return (x ^ s) & 0xFFFF;
    1.40 +-}
    1.41 +-
    1.42 +-#if defined(_MSC_VER) && (_MSC_VER >= 1600)
    1.43 +-#pragma optimize("", on)
    1.44 +-#endif
    1.45 ++SkFixed clamp_tileproc(SkFixed x);
    1.46 ++SkFixed repeat_tileproc(SkFixed x);
    1.47 ++SkFixed mirror_tileproc(SkFixed x);
    1.48 + 
    1.49 + ///////////////////////////////////////////////////////////////////////////////
    1.50 + 
    1.51 +-- 
    1.52 +1.7.11.7
    1.53 +

mercurial