Skip to content

Commit

Permalink
Limit public skia includes.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaurycyLiebner committed Sep 10, 2019
1 parent 7a3fe5d commit 0a9d4e3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/app/GUI/glwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#include <QDebug>
#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);
Expand Down
4 changes: 4 additions & 0 deletions src/core/Animators/SmartPath/nodelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/core/gpurendertools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<SkImage> img) :
Expand Down
12 changes: 11 additions & 1 deletion src/core/pointhelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 0 additions & 6 deletions src/core/skia/skiaincludes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <QtGui/qopengl.h>

#include "src/core/SkPointPriv.h"
#include "src/core/SkStroke.h"
#include "src/core/SkGeometry.h"

#define foreach Q_FOREACH

Expand Down

0 comments on commit 0a9d4e3

Please sign in to comment.