diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-11-18 16:40:25 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-11-27 09:55:17 +0100 |
commit | 5ce6f448ae3d00707202a2d52cf3d718431297f8 (patch) | |
tree | 138d8e40a9abb66d6e0af6a1d31e337115d0e9ab | |
parent | c8fd10fecabf04aab30cd8e911739873d5e32a2a (diff) |
solve the Skia lerp() conflict differently
New versions of libstdc++ provide lerp() in the global namespace,
older ones don't, but it depends on the libstdc++ version and not
the c++ version. Since the function is local, just "rename" it.
Change-Id: I37896190c620350739fba9b8ce6544f945519244
-rw-r--r-- | external/skia/lerp.patch | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/external/skia/lerp.patch b/external/skia/lerp.patch index c87a965e7caf..2062c21f2df0 100644 --- a/external/skia/lerp.patch +++ b/external/skia/lerp.patch @@ -1,14 +1,12 @@ ---- skia/src/shaders/SkPerlinNoiseShader.cpp.sav 2019-07-29 14:37:30.429563360 +0200 -+++ skia/src/shaders/SkPerlinNoiseShader.cpp 2019-07-29 16:45:29.736231751 +0200 -@@ -573,9 +573,11 @@ static SkScalar fade(SkScalar t) { +diff --git a/src/shaders/SkPerlinNoiseShader.cpp b/src/shaders/SkPerlinNoiseShader.cpp +index 812dc1694f..60b8d617c6 100644 +--- a/src/shaders/SkPerlinNoiseShader.cpp ++++ b/src/shaders/SkPerlinNoiseShader.cpp +@@ -573,6 +573,7 @@ static SkScalar fade(SkScalar t) { return t * t * t * (t * (t * 6 - 15) + 10); } -+#if __cplusplus <= 201703L ++#define lerp skia_lerp static SkScalar lerp(SkScalar t, SkScalar a, SkScalar b) { return a + t * (b - a); } -+#endif - - static SkScalar grad(int hash, SkScalar x, SkScalar y, SkScalar z) { - int h = hash & 15; |