From 5ce6f448ae3d00707202a2d52cf3d718431297f8 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Mon, 18 Nov 2019 16:40:25 +0100 Subject: 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 --- external/skia/lerp.patch | 14 ++++++-------- 1 file 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; -- cgit