From 435657fd62960ceffb1c3c63f63e836373560bc5 Mon Sep 17 00:00:00 2001 From: halcanary Date: Tue, 15 Sep 2015 12:53:07 -0700 Subject: Forward declare SkStrokeRec in SkPathEffect Review URL: https://codereview.chromium.org/1312163008 --- bench/DashBench.cpp | 1 + include/core/SkPathEffect.h | 2 +- samplecode/ClockFaceView.cpp | 1 + src/core/SkDraw.cpp | 1 + src/core/SkPaint.cpp | 1 + src/core/SkScalerContext.cpp | 1 + src/effects/Sk1DPathEffect.cpp | 1 + src/effects/Sk2DPathEffect.cpp | 1 + src/effects/SkDashPathEffect.cpp | 1 + src/effects/SkDiscretePathEffect.cpp | 1 + src/utils/SkDashPath.cpp | 1 + tests/DashPathEffectTest.cpp | 1 + tests/DrawPathTest.cpp | 1 + tests/PathTest.cpp | 1 + 14 files changed, 14 insertions(+), 1 deletion(-) diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp index 2653cdc992..10036341ac 100644 --- a/bench/DashBench.cpp +++ b/bench/DashBench.cpp @@ -13,6 +13,7 @@ #include "SkPath.h" #include "SkRandom.h" #include "SkString.h" +#include "SkStrokeRec.h" #include "SkTDArray.h" diff --git a/include/core/SkPathEffect.h b/include/core/SkPathEffect.h index 72ea4620c5..36e67e1de0 100644 --- a/include/core/SkPathEffect.h +++ b/include/core/SkPathEffect.h @@ -14,10 +14,10 @@ #include "SkPath.h" #include "SkPoint.h" #include "SkRect.h" -#include "SkStrokeRec.h" #include "SkTDArray.h" class SkPath; +class SkStrokeRec; /** \class SkPathEffect diff --git a/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp index 8362c35cb6..11684e11ad 100644 --- a/samplecode/ClockFaceView.cpp +++ b/samplecode/ClockFaceView.cpp @@ -17,6 +17,7 @@ #include "SkUtils.h" #include "SkColorPriv.h" #include "SkColorFilter.h" +#include "SkStrokeRec.h" #include "SkTypeface.h" static inline SkPMColor rgb2gray(SkPMColor c) { diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index dbdf6f73da..e4cf55a0ba 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -24,6 +24,7 @@ #include "SkSmallAllocator.h" #include "SkString.h" #include "SkStroke.h" +#include "SkStrokeRec.h" #include "SkTextMapStateProc.h" #include "SkTLazy.h" #include "SkUtils.h" diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp index e15c1a74db..2623052ec4 100644 --- a/src/core/SkPaint.cpp +++ b/src/core/SkPaint.cpp @@ -32,6 +32,7 @@ #include "SkTextToPathIter.h" #include "SkTLazy.h" #include "SkTypeface.h" +#include "SkStrokeRec.h" #include "SkSurfacePriv.h" #include "SkXfermode.h" diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index 70a9c30e3a..35a9b29558 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -21,6 +21,7 @@ #include "SkRasterizer.h" #include "SkRasterClip.h" #include "SkStroke.h" +#include "SkStrokeRec.h" #define ComputeBWRowBytes(width) (((unsigned)(width) + 7) >> 3) diff --git a/src/effects/Sk1DPathEffect.cpp b/src/effects/Sk1DPathEffect.cpp index d630a8ed6c..041886e1db 100644 --- a/src/effects/Sk1DPathEffect.cpp +++ b/src/effects/Sk1DPathEffect.cpp @@ -11,6 +11,7 @@ #include "SkReadBuffer.h" #include "SkWriteBuffer.h" #include "SkPathMeasure.h" +#include "SkStrokeRec.h" bool Sk1DPathEffect::filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*) const { diff --git a/src/effects/Sk2DPathEffect.cpp b/src/effects/Sk2DPathEffect.cpp index 1df69a51fc..7144526dd0 100644 --- a/src/effects/Sk2DPathEffect.cpp +++ b/src/effects/Sk2DPathEffect.cpp @@ -12,6 +12,7 @@ #include "SkWriteBuffer.h" #include "SkPath.h" #include "SkRegion.h" +#include "SkStrokeRec.h" Sk2DPathEffect::Sk2DPathEffect(const SkMatrix& mat) : fMatrix(mat) { fMatrixIsInvertible = mat.invert(&fInverse); diff --git a/src/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp index 2927f970aa..6e10e5466d 100644 --- a/src/effects/SkDashPathEffect.cpp +++ b/src/effects/SkDashPathEffect.cpp @@ -10,6 +10,7 @@ #include "SkDashPathPriv.h" #include "SkReadBuffer.h" #include "SkWriteBuffer.h" +#include "SkStrokeRec.h" SkDashPathEffect::SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase) : fPhase(0) diff --git a/src/effects/SkDiscretePathEffect.cpp b/src/effects/SkDiscretePathEffect.cpp index ac84a600e3..acde041298 100644 --- a/src/effects/SkDiscretePathEffect.cpp +++ b/src/effects/SkDiscretePathEffect.cpp @@ -11,6 +11,7 @@ #include "SkReadBuffer.h" #include "SkWriteBuffer.h" #include "SkPathMeasure.h" +#include "SkStrokeRec.h" static void Perterb(SkPoint* p, const SkVector& tangent, SkScalar scale) { SkVector normal = tangent; diff --git a/src/utils/SkDashPath.cpp b/src/utils/SkDashPath.cpp index c177295941..e0cbe9732d 100644 --- a/src/utils/SkDashPath.cpp +++ b/src/utils/SkDashPath.cpp @@ -7,6 +7,7 @@ #include "SkDashPathPriv.h" #include "SkPathMeasure.h" +#include "SkStrokeRec.h" static inline int is_even(int x) { return (~x) << 31; diff --git a/tests/DashPathEffectTest.cpp b/tests/DashPathEffectTest.cpp index d7c3d1d8d4..6639ec7b40 100644 --- a/tests/DashPathEffectTest.cpp +++ b/tests/DashPathEffectTest.cpp @@ -9,6 +9,7 @@ #include "SkDashPathEffect.h" #include "SkWriteBuffer.h" +#include "SkStrokeRec.h" // crbug.com/348821 was rooted in SkDashPathEffect refusing to flatten and unflatten itself when // fInitialDashLength < 0 (a signal the effect is nonsense). Here we test that it flattens. diff --git a/tests/DrawPathTest.cpp b/tests/DrawPathTest.cpp index 4351faf70e..e5d50d33d7 100644 --- a/tests/DrawPathTest.cpp +++ b/tests/DrawPathTest.cpp @@ -8,6 +8,7 @@ #include "SkBitmap.h" #include "SkCanvas.h" #include "SkDashPathEffect.h" +#include "SkStrokeRec.h" #include "SkSurface.h" #include "Test.h" diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp index cd9e8847a1..9c3bcced9a 100644 --- a/tests/PathTest.cpp +++ b/tests/PathTest.cpp @@ -16,6 +16,7 @@ #include "SkReader32.h" #include "SkSize.h" #include "SkStream.h" +#include "SkStrokeRec.h" #include "SkSurface.h" #include "SkTypes.h" #include "SkWriter32.h" -- cgit v1.2.3