aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/gpu/GrClipStackClip.cpp3
-rw-r--r--src/gpu/GrDrawingManager.cpp7
-rw-r--r--src/gpu/GrDrawingManager.h10
-rw-r--r--src/gpu/GrOnFlushResourceProvider.cpp2
-rw-r--r--src/gpu/GrPathRenderer.cpp102
-rw-r--r--src/gpu/GrPathRenderer.h114
-rw-r--r--src/gpu/GrReducedClip.cpp8
-rw-r--r--src/gpu/GrRenderTargetContext.cpp2
-rw-r--r--src/gpu/GrSoftwarePathRenderer.cpp3
-rw-r--r--src/gpu/GrSoftwarePathRenderer.h1
-rw-r--r--src/gpu/ccpr/GrCCDrawPathsOp.cpp3
-rw-r--r--src/gpu/ccpr/GrCoverageCountingPathRenderer.h3
-rw-r--r--src/gpu/ops/GrAAConvexPathRenderer.cpp3
-rw-r--r--src/gpu/ops/GrAAHairLinePathRenderer.cpp2
-rw-r--r--src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp2
-rw-r--r--src/gpu/ops/GrDashLinePathRenderer.cpp3
-rw-r--r--src/gpu/ops/GrDefaultPathRenderer.cpp2
-rw-r--r--src/gpu/ops/GrSmallPathRenderer.cpp3
-rw-r--r--src/gpu/ops/GrStencilAndCoverPathRenderer.cpp1
-rw-r--r--src/gpu/ops/GrStencilAndCoverPathRenderer.h1
-rw-r--r--src/gpu/ops/GrTessellatingPathRenderer.cpp9
-rw-r--r--tests/PathRendererCacheTests.cpp5
-rw-r--r--tests/TessellatingPathRendererTests.cpp5
23 files changed, 171 insertions, 123 deletions
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp
index 68c18be5e8..8095286329 100644
--- a/src/gpu/GrClipStackClip.cpp
+++ b/src/gpu/GrClipStackClip.cpp
@@ -6,7 +6,6 @@
*/
#include "GrClipStackClip.h"
-
#include "GrAppliedClip.h"
#include "GrContextPriv.h"
#include "GrDeferredProxyUploader.h"
@@ -16,7 +15,9 @@
#include "GrProxyProvider.h"
#include "GrRenderTargetContextPriv.h"
#include "GrSWMaskHelper.h"
+#include "GrShape.h"
#include "GrStencilAttachment.h"
+#include "GrStyle.h"
#include "GrTextureProxy.h"
#include "SkClipOpPriv.h"
#include "SkMakeUnique.h"
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index d481632d97..30d0016d67 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -528,6 +528,13 @@ GrCoverageCountingPathRenderer* GrDrawingManager::getCoverageCountingPathRendere
return fPathRendererChain->getCoverageCountingPathRenderer();
}
+void GrDrawingManager::flushIfNecessary() {
+ GrResourceCache* resourceCache = fContext->contextPriv().getResourceCache();
+ if (resourceCache && resourceCache->requestsFlush()) {
+ this->internalFlush(nullptr, GrResourceCache::kCacheRequested, 0, nullptr);
+ }
+}
+
sk_sp<GrRenderTargetContext> GrDrawingManager::makeRenderTargetContext(
sk_sp<GrSurfaceProxy> sProxy,
sk_sp<SkColorSpace> colorSpace,
diff --git a/src/gpu/GrDrawingManager.h b/src/gpu/GrDrawingManager.h
index 5978e487b1..91d1629348 100644
--- a/src/gpu/GrDrawingManager.h
+++ b/src/gpu/GrDrawingManager.h
@@ -10,7 +10,6 @@
#include "GrPathRenderer.h"
#include "GrPathRendererChain.h"
-#include "GrRenderTargetOpList.h"
#include "GrResourceCache.h"
#include "SkTArray.h"
#include "text/GrTextContext.h"
@@ -21,9 +20,11 @@ class GrOnFlushCallbackObject;
class GrRenderTargetContext;
class GrRenderTargetProxy;
class GrSingleOWner;
+class GrRenderTargetOpList;
class GrSoftwarePathRenderer;
class GrTextureContext;
class GrTextureOpList;
+class SkDeferredDisplayList;
// The GrDrawingManager allocates a new GrRenderTargetContext for each GrRenderTarget
// but all of them still land in the same GrOpList!
@@ -65,12 +66,7 @@ public:
// supported and turned on.
GrCoverageCountingPathRenderer* getCoverageCountingPathRenderer();
- void flushIfNecessary() {
- GrResourceCache* resourceCache = fContext->contextPriv().getResourceCache();
- if (resourceCache && resourceCache->requestsFlush()) {
- this->internalFlush(nullptr, GrResourceCache::kCacheRequested, 0, nullptr);
- }
- }
+ void flushIfNecessary();
static bool ProgramUnitTest(GrContext* context, int maxStages, int maxLevels);
diff --git a/src/gpu/GrOnFlushResourceProvider.cpp b/src/gpu/GrOnFlushResourceProvider.cpp
index d507f16307..ddf66020d2 100644
--- a/src/gpu/GrOnFlushResourceProvider.cpp
+++ b/src/gpu/GrOnFlushResourceProvider.cpp
@@ -6,10 +6,10 @@
*/
#include "GrOnFlushResourceProvider.h"
-
#include "GrContextPriv.h"
#include "GrDrawingManager.h"
#include "GrProxyProvider.h"
+#include "GrRenderTargetContext.h"
#include "GrSurfaceProxy.h"
sk_sp<GrRenderTargetContext> GrOnFlushResourceProvider::makeRenderTargetContext(
diff --git a/src/gpu/GrPathRenderer.cpp b/src/gpu/GrPathRenderer.cpp
index 1f53e84057..6c7bfed2d2 100644
--- a/src/gpu/GrPathRenderer.cpp
+++ b/src/gpu/GrPathRenderer.cpp
@@ -6,9 +6,84 @@
*/
#include "GrPathRenderer.h"
+#include "GrCaps.h"
+#include "GrContextPriv.h"
+#include "GrPaint.h"
+#include "GrRenderTargetContext.h"
+#include "GrShape.h"
+#include "GrUserStencilSettings.h"
+#include "SkDrawProcs.h"
-GrPathRenderer::GrPathRenderer() {
+#ifdef SK_DEBUG
+void GrPathRenderer::StencilPathArgs::validate() const {
+ SkASSERT(fContext);
+ SkASSERT(fRenderTargetContext);
+ SkASSERT(fClipConservativeBounds);
+ SkASSERT(fViewMatrix);
+ SkASSERT(fShape);
+ SkASSERT(fShape->style().isSimpleFill());
+ SkASSERT(GrAAType::kCoverage != fAAType);
+ SkPath path;
+ fShape->asPath(&path);
+ SkASSERT(!path.isInverseFillType());
}
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+GrPathRenderer::GrPathRenderer() {}
+
+GrPathRenderer::StencilSupport GrPathRenderer::getStencilSupport(const GrShape& shape) const {
+ SkDEBUGCODE(SkPath path;)
+ SkDEBUGCODE(shape.asPath(&path);)
+ SkASSERT(shape.style().isSimpleFill());
+ SkASSERT(!path.isInverseFillType());
+ return this->onGetStencilSupport(shape);
+}
+
+bool GrPathRenderer::drawPath(const DrawPathArgs& args) {
+#ifdef SK_DEBUG
+ args.validate();
+ CanDrawPathArgs canArgs;
+ canArgs.fCaps = args.fContext->contextPriv().caps();
+ canArgs.fClipConservativeBounds = args.fClipConservativeBounds;
+ canArgs.fViewMatrix = args.fViewMatrix;
+ canArgs.fShape = args.fShape;
+ canArgs.fAAType = args.fAAType;
+ canArgs.validate();
+
+ canArgs.fHasUserStencilSettings = !args.fUserStencilSettings->isUnused();
+ SkASSERT(!(canArgs.fAAType == GrAAType::kMSAA &&
+ GrFSAAType::kUnifiedMSAA != args.fRenderTargetContext->fsaaType()));
+ SkASSERT(!(canArgs.fAAType == GrAAType::kMixedSamples &&
+ GrFSAAType::kMixedSamples != args.fRenderTargetContext->fsaaType()));
+ SkASSERT(CanDrawPath::kNo != this->canDrawPath(canArgs));
+ if (!args.fUserStencilSettings->isUnused()) {
+ SkPath path;
+ args.fShape->asPath(&path);
+ SkASSERT(args.fShape->style().isSimpleFill());
+ SkASSERT(kNoRestriction_StencilSupport == this->getStencilSupport(*args.fShape));
+ }
+#endif
+ return this->onDrawPath(args);
+}
+
+bool GrPathRenderer::IsStrokeHairlineOrEquivalent(const GrStyle& style, const SkMatrix& matrix,
+ SkScalar* outCoverage) {
+ if (style.pathEffect()) {
+ return false;
+ }
+ const SkStrokeRec& stroke = style.strokeRec();
+ if (stroke.isHairlineStyle()) {
+ if (outCoverage) {
+ *outCoverage = SK_Scalar1;
+ }
+ return true;
+ }
+ return stroke.getStyle() == SkStrokeRec::kStroke_Style &&
+ SkDrawTreatAAStrokeAsHairline(stroke.getWidth(), matrix, outCoverage);
+}
+
void GrPathRenderer::GetPathDevBounds(const SkPath& path,
int devW, int devH,
@@ -21,3 +96,28 @@ void GrPathRenderer::GetPathDevBounds(const SkPath& path,
*bounds = path.getBounds();
matrix.mapRect(bounds);
}
+
+void GrPathRenderer::onStencilPath(const StencilPathArgs& args) {
+ static constexpr GrUserStencilSettings kIncrementStencil(
+ GrUserStencilSettings::StaticInit<
+ 0xffff,
+ GrUserStencilTest::kAlways,
+ 0xffff,
+ GrUserStencilOp::kReplace,
+ GrUserStencilOp::kReplace,
+ 0xffff>()
+ );
+
+ GrPaint paint;
+ DrawPathArgs drawArgs{args.fContext,
+ std::move(paint),
+ &kIncrementStencil,
+ args.fRenderTargetContext,
+ nullptr, // clip
+ args.fClipConservativeBounds,
+ args.fViewMatrix,
+ args.fShape,
+ args.fAAType,
+ false};
+ this->drawPath(drawArgs);
+}
diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h
index 39208bc635..5b59563eda 100644
--- a/src/gpu/GrPathRenderer.h
+++ b/src/gpu/GrPathRenderer.h
@@ -8,18 +8,23 @@
#ifndef GrPathRenderer_DEFINED
#define GrPathRenderer_DEFINED
-#include "GrCaps.h"
-#include "GrContextPriv.h"
-#include "GrPaint.h"
-#include "GrRenderTargetContext.h"
-#include "GrShape.h"
-#include "GrUserStencilSettings.h"
-#include "SkDrawProcs.h"
+#include "GrTypesPriv.h"
#include "SkTArray.h"
+#include "SkRefCnt.h"
-class SkPath;
+class GrCaps;
+class GrClip;
+class GrContext;
class GrFixedClip;
class GrHardClip;
+class GrPaint;
+class GrRenderTargetContext;
+class GrShape;
+class GrStyle;
+struct GrUserStencilSettings;
+struct SkIRect;
+class SkMatrix;
+class SkPath;
/**
* Base class for drawing paths into a GrOpList.
@@ -59,13 +64,7 @@ public:
* @param shape the shape that will be drawn. Must be simple fill styled and non-inverse
* filled.
*/
- StencilSupport getStencilSupport(const GrShape& shape) const {
- SkDEBUGCODE(SkPath path;)
- SkDEBUGCODE(shape.asPath(&path);)
- SkASSERT(shape.style().isSimpleFill());
- SkASSERT(!path.isInverseFillType());
- return this->onGetStencilSupport(shape);
- }
+ StencilSupport getStencilSupport(const GrShape& shape) const;
enum class CanDrawPath {
kNo,
@@ -133,33 +132,7 @@ public:
* Draws the path into the draw target. If getStencilSupport() would return kNoRestriction then
* the subclass must respect the stencil settings.
*/
- bool drawPath(const DrawPathArgs& args) {
- SkDEBUGCODE(args.validate();)
-#ifdef SK_DEBUG
- CanDrawPathArgs canArgs;
- canArgs.fCaps = args.fContext->contextPriv().caps();
- canArgs.fClipConservativeBounds = args.fClipConservativeBounds;
- canArgs.fViewMatrix = args.fViewMatrix;
- canArgs.fShape = args.fShape;
- canArgs.fAAType = args.fAAType;
- canArgs.validate();
-
- canArgs.fHasUserStencilSettings = !args.fUserStencilSettings->isUnused();
- SkASSERT(!(canArgs.fAAType == GrAAType::kMSAA &&
- GrFSAAType::kUnifiedMSAA != args.fRenderTargetContext->fsaaType()));
- SkASSERT(!(canArgs.fAAType == GrAAType::kMixedSamples &&
- GrFSAAType::kMixedSamples != args.fRenderTargetContext->fsaaType()));
- SkASSERT(CanDrawPath::kNo != this->canDrawPath(canArgs));
- if (!args.fUserStencilSettings->isUnused()) {
- SkPath path;
- args.fShape->asPath(&path);
- SkASSERT(args.fShape->style().isSimpleFill());
- SkASSERT(kNoRestriction_StencilSupport == this->getStencilSupport(*args.fShape));
- }
-#endif
- return this->onDrawPath(args);
- }
-
+ bool drawPath(const DrawPathArgs& args);
/**
* Args to stencilPath(). fAAType cannot be kCoverage.
*/
@@ -174,20 +147,7 @@ public:
GrAAType fAAType;
const GrShape* fShape;
-#ifdef SK_DEBUG
- void validate() const {
- SkASSERT(fContext);
- SkASSERT(fRenderTargetContext);
- SkASSERT(fClipConservativeBounds);
- SkASSERT(fViewMatrix);
- SkASSERT(fShape);
- SkASSERT(fShape->style().isSimpleFill());
- SkASSERT(GrAAType::kCoverage != fAAType);
- SkPath path;
- fShape->asPath(&path);
- SkASSERT(!path.isInverseFillType());
- }
-#endif
+ SkDEBUGCODE(void validate() const);
};
/**
@@ -202,21 +162,8 @@ public:
// Helper for determining if we can treat a thin stroke as a hairline w/ coverage.
// If we can, we draw lots faster (raster device does this same test).
- static bool IsStrokeHairlineOrEquivalent(const GrStyle& style, const SkMatrix& matrix,
- SkScalar* outCoverage) {
- if (style.pathEffect()) {
- return false;
- }
- const SkStrokeRec& stroke = style.strokeRec();
- if (stroke.isHairlineStyle()) {
- if (outCoverage) {
- *outCoverage = SK_Scalar1;
- }
- return true;
- }
- return stroke.getStyle() == SkStrokeRec::kStroke_Style &&
- SkDrawTreatAAStrokeAsHairline(stroke.getWidth(), matrix, outCoverage);
- }
+ static bool IsStrokeHairlineOrEquivalent(const GrStyle&, const SkMatrix&,
+ SkScalar* outCoverage);
protected:
// Helper for getting the device bounds of a path. Inverse filled paths will have bounds set
@@ -249,30 +196,7 @@ private:
* Subclass implementation of stencilPath(). Subclass must override iff it ever returns
* kStencilOnly in onGetStencilSupport().
*/
- virtual void onStencilPath(const StencilPathArgs& args) {
- static constexpr GrUserStencilSettings kIncrementStencil(
- GrUserStencilSettings::StaticInit<
- 0xffff,
- GrUserStencilTest::kAlways,
- 0xffff,
- GrUserStencilOp::kReplace,
- GrUserStencilOp::kReplace,
- 0xffff>()
- );
-
- GrPaint paint;
- DrawPathArgs drawArgs{args.fContext,
- std::move(paint),
- &kIncrementStencil,
- args.fRenderTargetContext,
- nullptr, // clip
- args.fClipConservativeBounds,
- args.fViewMatrix,
- args.fShape,
- args.fAAType,
- false};
- this->drawPath(drawArgs);
- }
+ virtual void onStencilPath(const StencilPathArgs&);
typedef SkRefCnt INHERITED;
};
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp
index 2377846153..4cf34774fe 100644
--- a/src/gpu/GrReducedClip.cpp
+++ b/src/gpu/GrReducedClip.cpp
@@ -6,18 +6,18 @@
*/
#include "GrReducedClip.h"
-
#include "GrAppliedClip.h"
#include "GrClip.h"
#include "GrColor.h"
#include "GrContextPriv.h"
-#include "GrRenderTargetContext.h"
-#include "GrRenderTargetContextPriv.h"
#include "GrDrawingManager.h"
#include "GrFixedClip.h"
#include "GrPathRenderer.h"
-#include "GrStencilSettings.h"
+#include "GrRenderTargetContext.h"
+#include "GrRenderTargetContextPriv.h"
+#include "GrShape.h"
#include "GrStencilClip.h"
+#include "GrStencilSettings.h"
#include "GrStyle.h"
#include "GrUserStencilSettings.h"
#include "SkClipOpPriv.h"
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index 05b3c2475a..497518f46f 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -22,7 +22,9 @@
#include "GrRenderTarget.h"
#include "GrRenderTargetContextPriv.h"
#include "GrResourceProvider.h"
+#include "GrShape.h"
#include "GrStencilAttachment.h"
+#include "GrStyle.h"
#include "GrTracing.h"
#include "SkDrawShadowInfo.h"
#include "SkGr.h"
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index 16bfbe96d1..ee52122840 100644
--- a/src/gpu/GrSoftwarePathRenderer.cpp
+++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -14,8 +14,9 @@
#include "GrOpFlushState.h"
#include "GrOpList.h"
#include "GrProxyProvider.h"
-#include "GrSurfaceContextPriv.h"
#include "GrSWMaskHelper.h"
+#include "GrShape.h"
+#include "GrSurfaceContextPriv.h"
#include "SkMakeUnique.h"
#include "SkSemaphore.h"
#include "SkTaskGroup.h"
diff --git a/src/gpu/GrSoftwarePathRenderer.h b/src/gpu/GrSoftwarePathRenderer.h
index b399a188b7..925cc52889 100644
--- a/src/gpu/GrSoftwarePathRenderer.h
+++ b/src/gpu/GrSoftwarePathRenderer.h
@@ -11,6 +11,7 @@
#include "GrPathRenderer.h"
class GrProxyProvider;
+class GrTextureProxy;
/**
* This class uses the software side to render a path to an SkBitmap and
diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.cpp b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
index 3f709592e0..042a45bb4e 100644
--- a/src/gpu/ccpr/GrCCDrawPathsOp.cpp
+++ b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
@@ -6,7 +6,8 @@
*/
#include "GrCCDrawPathsOp.h"
-
+#include "GrContext.h"
+#include "GrContextPriv.h"
#include "GrMemoryPool.h"
#include "GrOpFlushState.h"
#include "ccpr/GrCCPathCache.h"
diff --git a/src/gpu/ccpr/GrCoverageCountingPathRenderer.h b/src/gpu/ccpr/GrCoverageCountingPathRenderer.h
index d92d915958..0ec9aa0a57 100644
--- a/src/gpu/ccpr/GrCoverageCountingPathRenderer.h
+++ b/src/gpu/ccpr/GrCoverageCountingPathRenderer.h
@@ -8,11 +8,12 @@
#ifndef GrCoverageCountingPathRenderer_DEFINED
#define GrCoverageCountingPathRenderer_DEFINED
+#include <map>
#include "GrCCPerOpListPaths.h"
+#include "GrOnFlushResourceProvider.h"
#include "GrPathRenderer.h"
#include "GrRenderTargetOpList.h"
#include "ccpr/GrCCPerFlushResources.h"
-#include <map>
class GrCCDrawPathsOp;
class GrCCPathCache;
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index 37cb23bdf8..cfff457af5 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -6,7 +6,6 @@
*/
#include "GrAAConvexPathRenderer.h"
-
#include "GrAAConvexTessellator.h"
#include "GrCaps.h"
#include "GrContext.h"
@@ -16,6 +15,8 @@
#include "GrOpFlushState.h"
#include "GrPathUtils.h"
#include "GrProcessor.h"
+#include "GrRenderTargetContext.h"
+#include "GrShape.h"
#include "GrSimpleMeshDrawOpHelper.h"
#include "SkGeometry.h"
#include "SkPathPriv.h"
diff --git a/src/gpu/ops/GrAAHairLinePathRenderer.cpp b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
index af5cb3dbbc..620a8c0576 100644
--- a/src/gpu/ops/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
@@ -16,7 +16,9 @@
#include "GrPathUtils.h"
#include "GrProcessor.h"
#include "GrResourceProvider.h"
+#include "GrShape.h"
#include "GrSimpleMeshDrawOpHelper.h"
+#include "GrStyle.h"
#include "SkGeometry.h"
#include "SkMatrixPriv.h"
#include "SkPoint3.h"
diff --git a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
index 1876d6c531..7b1082a0fd 100644
--- a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
@@ -14,6 +14,8 @@
#include "GrOpFlushState.h"
#include "GrPathUtils.h"
#include "GrProcessor.h"
+#include "GrRenderTargetContext.h"
+#include "GrShape.h"
#include "GrStyle.h"
#include "SkGeometry.h"
#include "SkPathPriv.h"
diff --git a/src/gpu/ops/GrDashLinePathRenderer.cpp b/src/gpu/ops/GrDashLinePathRenderer.cpp
index 7c2ff9e688..5e9b369ee2 100644
--- a/src/gpu/ops/GrDashLinePathRenderer.cpp
+++ b/src/gpu/ops/GrDashLinePathRenderer.cpp
@@ -6,9 +6,10 @@
*/
#include "GrDashLinePathRenderer.h"
-
#include "GrAuditTrail.h"
#include "GrGpu.h"
+#include "GrRenderTargetContext.h"
+#include "GrShape.h"
#include "ops/GrDashOp.h"
#include "ops/GrMeshDrawOp.h"
diff --git a/src/gpu/ops/GrDefaultPathRenderer.cpp b/src/gpu/ops/GrDefaultPathRenderer.cpp
index af4546cbb1..a48dedc048 100644
--- a/src/gpu/ops/GrDefaultPathRenderer.cpp
+++ b/src/gpu/ops/GrDefaultPathRenderer.cpp
@@ -13,7 +13,9 @@
#include "GrMesh.h"
#include "GrOpFlushState.h"
#include "GrPathUtils.h"
+#include "GrShape.h"
#include "GrSimpleMeshDrawOpHelper.h"
+#include "GrStyle.h"
#include "GrSurfaceContextPriv.h"
#include "SkGeometry.h"
#include "SkString.h"
diff --git a/src/gpu/ops/GrSmallPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp
index 0cd99d7469..01c84ee0a0 100644
--- a/src/gpu/ops/GrSmallPathRenderer.cpp
+++ b/src/gpu/ops/GrSmallPathRenderer.cpp
@@ -12,11 +12,14 @@
#include "GrDistanceFieldGenFromVector.h"
#include "GrDrawOpTest.h"
#include "GrQuad.h"
+#include "GrRenderTargetContext.h"
#include "GrResourceProvider.h"
#include "GrSimpleMeshDrawOpHelper.h"
#include "SkAutoMalloc.h"
#include "SkAutoPixmapStorage.h"
#include "SkDistanceFieldGen.h"
+#include "SkDraw.h"
+#include "SkPaint.h"
#include "SkPointPriv.h"
#include "SkRasterClip.h"
#include "effects/GrBitmapTextGeoProc.h"
diff --git a/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp b/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp
index f395927b63..a0ef219c6f 100644
--- a/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/ops/GrStencilAndCoverPathRenderer.cpp
@@ -14,6 +14,7 @@
#include "GrPath.h"
#include "GrRenderTargetContextPriv.h"
#include "GrResourceProvider.h"
+#include "GrShape.h"
#include "GrStencilClip.h"
#include "GrStencilPathOp.h"
#include "GrStyle.h"
diff --git a/src/gpu/ops/GrStencilAndCoverPathRenderer.h b/src/gpu/ops/GrStencilAndCoverPathRenderer.h
index dda0157a5c..8649be2f59 100644
--- a/src/gpu/ops/GrStencilAndCoverPathRenderer.h
+++ b/src/gpu/ops/GrStencilAndCoverPathRenderer.h
@@ -12,6 +12,7 @@
class GrContext;
class GrGpu;
+class GrResourceProvider;
/**
* Uses GrGpu::stencilPath followed by a cover rectangle. This subclass doesn't apply AA; it relies
diff --git a/src/gpu/ops/GrTessellatingPathRenderer.cpp b/src/gpu/ops/GrTessellatingPathRenderer.cpp
index ed59834a87..ec33f3868f 100644
--- a/src/gpu/ops/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/ops/GrTessellatingPathRenderer.cpp
@@ -6,7 +6,7 @@
*/
#include "GrTessellatingPathRenderer.h"
-
+#include <stdio.h>
#include "GrAuditTrail.h"
#include "GrClip.h"
#include "GrDefaultGeoProcFactory.h"
@@ -16,14 +16,13 @@
#include "GrPathUtils.h"
#include "GrResourceCache.h"
#include "GrResourceProvider.h"
+#include "GrShape.h"
+#include "GrSimpleMeshDrawOpHelper.h"
+#include "GrStyle.h"
#include "GrTessellator.h"
#include "SkGeometry.h"
-
-#include "GrSimpleMeshDrawOpHelper.h"
#include "ops/GrMeshDrawOp.h"
-#include <stdio.h>
-
#ifndef GR_AA_TESSELLATOR_MAX_VERB_COUNT
#define GR_AA_TESSELLATOR_MAX_VERB_COUNT 10
#endif
diff --git a/tests/PathRendererCacheTests.cpp b/tests/PathRendererCacheTests.cpp
index 0dfe654b8c..32e5b7dfd2 100644
--- a/tests/PathRendererCacheTests.cpp
+++ b/tests/PathRendererCacheTests.cpp
@@ -7,13 +7,14 @@
#include "Test.h"
-#include "SkPath.h"
-
#include "GrClip.h"
#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrResourceCache.h"
+#include "GrShape.h"
#include "GrSoftwarePathRenderer.h"
+#include "GrStyle.h"
+#include "SkPath.h"
#include "effects/GrPorterDuffXferProcessor.h"
#include "ops/GrTessellatingPathRenderer.h"
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp
index 0c7a5ca4c5..2891131f90 100644
--- a/tests/TessellatingPathRendererTests.cpp
+++ b/tests/TessellatingPathRendererTests.cpp
@@ -7,12 +7,13 @@
#include "Test.h"
-#include "SkPath.h"
-
#include "GrClip.h"
#include "GrContext.h"
#include "GrContextPriv.h"
+#include "GrShape.h"
+#include "GrStyle.h"
#include "SkGradientShader.h"
+#include "SkPath.h"
#include "SkShaderBase.h"
#include "effects/GrPorterDuffXferProcessor.h"
#include "ops/GrTessellatingPathRenderer.h"