diff --git a/src/app/GUI/glwindow.cpp b/src/app/GUI/glwindow.cpp index 162c036a4..3d7cb48d6 100644 --- a/src/app/GUI/glwindow.cpp +++ b/src/app/GUI/glwindow.cpp @@ -20,6 +20,10 @@ #include #include "exceptions.h" +#undef foreach +#include "src/gpu/gl/GrGLDefines.h" +#define foreach Q_FOREACH + GLWindow::GLWindow(QWidget * const parent) : QOpenGLWidget(parent) { setUpdateBehavior(QOpenGLWidget::NoPartialUpdate); diff --git a/src/core/Animators/SmartPath/nodelist.cpp b/src/core/Animators/SmartPath/nodelist.cpp index 27ff5e5b0..f8f111569 100644 --- a/src/core/Animators/SmartPath/nodelist.cpp +++ b/src/core/Animators/SmartPath/nodelist.cpp @@ -370,6 +370,10 @@ SkPath NodeList::toSkPath() const { return result; } +#undef foreach +#include "src/core/SkGeometry.h" +#define foreach Q_FOREACH + void NodeList::setPath(const SkPath &path) { mNodes.clear(); Node * firstNode = nullptr; diff --git a/src/core/gpurendertools.cpp b/src/core/gpurendertools.cpp index 366f3a7cc..9d0321928 100644 --- a/src/core/gpurendertools.cpp +++ b/src/core/gpurendertools.cpp @@ -16,6 +16,10 @@ #include "gpurendertools.h" +#undef foreach +#include "src/gpu/gl/GrGLDefines.h" +#define foreach Q_FOREACH + GpuRenderTools::GpuRenderTools(QGL33 * const gl, SwitchableContext &context, sk_sp img) : diff --git a/src/core/pointhelpers.cpp b/src/core/pointhelpers.cpp index 60a66c2f0..6e2b17ebd 100644 --- a/src/core/pointhelpers.cpp +++ b/src/core/pointhelpers.cpp @@ -748,12 +748,22 @@ void gForEverySegmentInPath( } } +static void RotateCCW(const SkPoint& src, SkPoint* dst) { + // use a tmp in case src == dst + const SkScalar tmp = src.fX; + dst->fX = src.fY; + dst->fY = -tmp; +} + +static void RotateCCW(SkPoint* pt) { + RotateCCW(*pt, pt); +} static void Perterb(SkPoint * const p, const SkVector& tangent, const float scale) { SkVector normal = tangent; - SkPointPriv::RotateCCW(&normal); + RotateCCW(&normal); normal.setLength(scale); *p += normal; } diff --git a/src/core/skia/skiaincludes.h b/src/core/skia/skiaincludes.h index 8b1b7385f..625417c7a 100644 --- a/src/core/skia/skiaincludes.h +++ b/src/core/skia/skiaincludes.h @@ -47,19 +47,13 @@ #include "include/effects/SkBlurImageFilter.h" #include "include/effects/SkDropShadowImageFilter.h" -#include "src/gpu/gl/GrGLDefines.h" - #include "include/gpu/gl/GrGLTypes.h" #include "include/gpu/gl/GrGLFunctions.h" #include "include/gpu/gl/GrGLInterface.h" -#include "third_party/externals/sdl/include/SDL.h" - #include -#include "src/core/SkPointPriv.h" #include "src/core/SkStroke.h" -#include "src/core/SkGeometry.h" #define foreach Q_FOREACH