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