Make GrClip.h private

BUG=skia:

Change-Id: I4aa3c2707811ece3a63d161035e316c3bbc1cd15
Reviewed-on: https://skia-review.googlesource.com/9482
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/gn/gpu.gni b/gn/gpu.gni
index e34ff45..59ba257 100644
--- a/gn/gpu.gni
+++ b/gn/gpu.gni
@@ -11,7 +11,6 @@
   "$_include/gpu/GrBlend.h",
   "$_include/gpu/GrBuffer.h",
   "$_include/gpu/GrCaps.h",
-  "$_include/gpu/GrClip.h",
   "$_include/gpu/GrColor.h",
   "$_include/gpu/GrColorSpaceXform.h",
   "$_include/gpu/GrConfig.h",
@@ -77,6 +76,7 @@
   "$_src/gpu/GrBufferAllocPool.cpp",
   "$_src/gpu/GrBufferAllocPool.h",
   "$_src/gpu/GrCaps.cpp",
+  "$_src/gpu/GrClip.h",
   "$_src/gpu/GrClipStackClip.h",
   "$_src/gpu/GrClipStackClip.cpp",
   "$_src/gpu/GrColorSpaceXform.cpp",
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 3a7fd54..7ac5a93 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -9,7 +9,6 @@
 #define GrContext_DEFINED
 
 #include "GrCaps.h"
-#include "GrClip.h"
 #include "GrColor.h"
 #include "GrPaint.h"
 #include "GrRenderTarget.h"
diff --git a/src/effects/SkArithmeticImageFilter.cpp b/src/effects/SkArithmeticImageFilter.cpp
index 189171a..8bc7625 100644
--- a/src/effects/SkArithmeticImageFilter.cpp
+++ b/src/effects/SkArithmeticImageFilter.cpp
@@ -15,6 +15,7 @@
 #include "SkWriteBuffer.h"
 #include "SkXfermodeImageFilter.h"
 #if SK_SUPPORT_GPU
+#include "GrClip.h"
 #include "GrContext.h"
 #include "GrRenderTargetContext.h"
 #include "GrTextureProxy.h"
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 7ca7aa8..e1acf88 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -17,13 +17,14 @@
 
 #if SK_SUPPORT_GPU
 #include "GrCircleBlurFragmentProcessor.h"
+#include "GrClip.h"
 #include "GrContext.h"
+#include "GrFragmentProcessor.h"
 #include "GrRenderTargetContext.h"
 #include "GrResourceProvider.h"
-#include "GrTexture.h"
-#include "GrFragmentProcessor.h"
 #include "GrShaderCaps.h"
 #include "GrStyle.h"
+#include "GrTexture.h"
 #include "GrTextureProxy.h"
 #include "effects/GrSimpleTextureEffect.h"
 #include "glsl/GrGLSLFragmentProcessor.h"
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index 0a3b6a8..4e12eca 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -14,11 +14,11 @@
 #include "SkUnPreMultiply.h"
 #include "SkColorPriv.h"
 #if SK_SUPPORT_GPU
+#include "GrClip.h"
 #include "GrContext.h"
 #include "GrCoordTransform.h"
 #include "GrRenderTargetContext.h"
 #include "GrTextureProxy.h"
-
 #include "SkGr.h"
 #include "effects/GrTextureDomain.h"
 #include "glsl/GrGLSLColorSpaceXformHelper.h"
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index 5e1a8b5..481d9d4 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -15,6 +15,7 @@
 #include "SkSpecialSurface.h"
 #include "SkWriteBuffer.h"
 #if SK_SUPPORT_GPU
+#include "GrClip.h"
 #include "GrContext.h"
 #include "GrRenderTargetContext.h"
 #include "GrTextureProxy.h"
diff --git a/include/gpu/GrClip.h b/src/gpu/GrClip.h
similarity index 91%
rename from include/gpu/GrClip.h
rename to src/gpu/GrClip.h
index 9bf2da2..eb4eab2 100644
--- a/include/gpu/GrClip.h
+++ b/src/gpu/GrClip.h
@@ -9,8 +9,8 @@
 #define GrClip_DEFINED
 
 #include "GrTypes.h"
-#include "SkRect.h"
 #include "SkRRect.h"
+#include "SkRect.h"
 
 class GrAppliedClip;
 class GrContext;
@@ -63,8 +63,8 @@
      * @param innerClipBounds   device-space rect contained by the clip (SkRect or SkIRect).
      * @param queryBounds       device-space bounds of the query region.
      */
-    template<typename TRect> constexpr static bool IsInsideClip(const TRect& innerClipBounds,
-                                                                const SkRect& queryBounds) {
+    template <typename TRect>
+    constexpr static bool IsInsideClip(const TRect& innerClipBounds, const SkRect& queryBounds) {
         return innerClipBounds.fRight - innerClipBounds.fLeft > kBoundsTolerance &&
                innerClipBounds.fBottom - innerClipBounds.fTop > kBoundsTolerance &&
                innerClipBounds.fLeft < queryBounds.fLeft + kBoundsTolerance &&
@@ -79,8 +79,8 @@
      * @param outerClipBounds   device-space rect that contains the clip (SkRect or SkIRect).
      * @param queryBounds       device-space bounds of the query region.
      */
-    template<typename TRect> constexpr static bool IsOutsideClip(const TRect& outerClipBounds,
-                                                                 const SkRect& queryBounds) {
+    template <typename TRect>
+    constexpr static bool IsOutsideClip(const TRect& outerClipBounds, const SkRect& queryBounds) {
         return outerClipBounds.fRight - outerClipBounds.fLeft <= kBoundsTolerance ||
                outerClipBounds.fBottom - outerClipBounds.fTop <= kBoundsTolerance ||
                outerClipBounds.fLeft >= queryBounds.fRight - kBoundsTolerance ||
@@ -125,12 +125,8 @@
  */
 class GrNoClip final : public GrClip {
 private:
-    bool quickContains(const SkRect&) const final {
-        return true;
-    }
-    bool quickContains(const SkRRect&) const final {
-        return true;
-    }
+    bool quickContains(const SkRect&) const final { return true; }
+    bool quickContains(const SkRRect&) const final { return true; }
     void getConservativeBounds(int width, int height, SkIRect* devResult,
                                bool* isIntersectionOfRects) const final {
         devResult->setXYWH(0, 0, width, height);
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 67c497b..40e212d 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -6,24 +6,23 @@
  */
 
 #include "GrContext.h"
-#include "GrContextPriv.h"
+#include "GrClip.h"
 #include "GrContextOptions.h"
+#include "GrContextPriv.h"
 #include "GrDrawingManager.h"
 #include "GrRenderTargetContext.h"
+#include "GrRenderTargetProxy.h"
 #include "GrResourceCache.h"
 #include "GrResourceProvider.h"
-#include "GrRenderTargetProxy.h"
 #include "GrSemaphore.h"
 #include "GrSoftwarePathRenderer.h"
 #include "GrSurfaceContext.h"
 #include "GrSurfacePriv.h"
 #include "GrSurfaceProxyPriv.h"
 #include "GrTextureContext.h"
-
 #include "SkConvertPixels.h"
 #include "SkGr.h"
 #include "SkUnPreMultiplyPriv.h"
-
 #include "effects/GrConfigConversionEffect.h"
 #include "text/GrTextBlobCache.h"
 
diff --git a/src/gpu/GrTextureProducer.cpp b/src/gpu/GrTextureProducer.cpp
index 496dbb2..37fab37 100644
--- a/src/gpu/GrTextureProducer.cpp
+++ b/src/gpu/GrTextureProducer.cpp
@@ -6,7 +6,7 @@
  */
 
 #include "GrTextureProducer.h"
-
+#include "GrClip.h"
 #include "GrRenderTargetContext.h"
 #include "GrTexture.h"
 #include "effects/GrBicubicEffect.h"
diff --git a/src/gpu/GrYUVProvider.cpp b/src/gpu/GrYUVProvider.cpp
index 8d921a4..84a41f8 100644
--- a/src/gpu/GrYUVProvider.cpp
+++ b/src/gpu/GrYUVProvider.cpp
@@ -5,19 +5,19 @@
  * found in the LICENSE file.
  */
 
+#include "GrYUVProvider.h"
+#include "GrClip.h"
 #include "GrContext.h"
 #include "GrContextPriv.h"
 #include "GrRenderTargetContext.h"
 #include "GrTextureProxy.h"
-#include "GrYUVProvider.h"
-#include "effects/GrSRGBEffect.h"
-#include "effects/GrYUVEffect.h"
-
 #include "SkAutoMalloc.h"
 #include "SkCachedData.h"
 #include "SkRefCnt.h"
 #include "SkResourceCache.h"
 #include "SkYUVPlanesCache.h"
+#include "effects/GrSRGBEffect.h"
+#include "effects/GrYUVEffect.h"
 
 namespace {
 /**
diff --git a/src/gpu/GrYUVProvider.h b/src/gpu/GrYUVProvider.h
index ef3ae6d..af5a4a4 100644
--- a/src/gpu/GrYUVProvider.h
+++ b/src/gpu/GrYUVProvider.h
@@ -14,6 +14,7 @@
 
 class GrContext;
 class GrTexture;
+class GrTextureProxy;
 
 /**
  *  There are at least 2 different ways to extract/retrieve YUV planar data...
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index d629902..7bdcaf5 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -6,13 +6,14 @@
  */
 
 #include "GrConfigConversionEffect.h"
+#include "../private/GrGLSL.h"
+#include "GrClip.h"
 #include "GrContext.h"
 #include "GrRenderTargetContext.h"
 #include "GrSimpleTextureEffect.h"
 #include "SkMatrix.h"
 #include "glsl/GrGLSLFragmentProcessor.h"
 #include "glsl/GrGLSLFragmentShaderBuilder.h"
-#include "../private/GrGLSL.h"
 
 class GrGLConfigConversionEffect : public GrGLSLFragmentProcessor {
 public:
diff --git a/src/gpu/ops/GrAAHairLinePathRenderer.cpp b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
index 6e24483..408740d 100644
--- a/src/gpu/ops/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
@@ -6,9 +6,9 @@
  */
 
 #include "GrAAHairLinePathRenderer.h"
-
 #include "GrBuffer.h"
 #include "GrCaps.h"
+#include "GrClip.h"
 #include "GrContext.h"
 #include "GrDefaultGeoProcFactory.h"
 #include "GrDrawOpTest.h"
@@ -20,10 +20,8 @@
 #include "SkGeometry.h"
 #include "SkStroke.h"
 #include "SkTemplates.h"
-
-#include "ops/GrMeshDrawOp.h"
-
 #include "effects/GrBezierEffect.h"
+#include "ops/GrMeshDrawOp.h"
 
 #define PREALLOC_PTARRAY(N) SkSTArray<(N),SkPoint, true>
 
diff --git a/src/image/SkImage_Gpu.h b/src/image/SkImage_Gpu.h
index 419d4d1..0ad44d3 100644
--- a/src/image/SkImage_Gpu.h
+++ b/src/image/SkImage_Gpu.h
@@ -8,13 +8,14 @@
 #ifndef SkImage_Gpu_DEFINED
 #define SkImage_Gpu_DEFINED
 
-#include "SkAtomics.h"
-#include "GrTexture.h"
+#include "GrClip.h"
 #include "GrGpuResourcePriv.h"
+#include "GrTexture.h"
+#include "SkAtomics.h"
 #include "SkBitmap.h"
 #include "SkGr.h"
-#include "SkImage_Base.h"
 #include "SkImagePriv.h"
+#include "SkImage_Base.h"
 #include "SkSurface.h"
 
 class SkImage_Gpu : public SkImage_Base {
diff --git a/tests/ImageStorageTest.cpp b/tests/ImageStorageTest.cpp
index 4230506..59bb38b 100644
--- a/tests/ImageStorageTest.cpp
+++ b/tests/ImageStorageTest.cpp
@@ -9,6 +9,7 @@
 
 #if SK_SUPPORT_GPU
 
+#include "GrClip.h"
 #include "GrFragmentProcessor.h"
 #include "GrRenderTargetContext.h"
 #include "GrResourceProvider.h"
diff --git a/tests/IntTextureTest.cpp b/tests/IntTextureTest.cpp
index 14b18b2..93a9ced 100644
--- a/tests/IntTextureTest.cpp
+++ b/tests/IntTextureTest.cpp
@@ -8,6 +8,7 @@
 #include "Test.h"
 
 #if SK_SUPPORT_GPU
+#include "GrClip.h"
 #include "GrContext.h"
 #include "GrRenderTargetContext.h"
 #include "GrResourceProvider.h"
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index 0b8f6fe..03646e1 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -9,6 +9,7 @@
 #include "Test.h"
 
 #if SK_SUPPORT_GPU
+#include "GrClip.h"
 #include "GrContext.h"
 #include "GrGpuResource.h"
 #include "GrPipelineBuilder.h"
diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp
index ef5f2d3..0f164eb 100644
--- a/tests/RectangleTextureTest.cpp
+++ b/tests/RectangleTextureTest.cpp
@@ -9,12 +9,13 @@
 #include "TestUtils.h"
 
 #if SK_SUPPORT_GPU
+#include "GrClip.h"
 #include "GrContext.h"
 #include "GrContextPriv.h"
 #include "GrRenderTargetContext.h"
+#include "gl/GLTestContext.h"
 #include "gl/GrGLGpu.h"
 #include "gl/GrGLUtil.h"
-#include "gl/GLTestContext.h"
 
 // skbug.com/5932
 static void test_basic_draw_as_src(skiatest::Reporter* reporter, GrContext* context,
diff --git a/tests/SRGBMipMapTest.cpp b/tests/SRGBMipMapTest.cpp
index e01d676..bf983ee 100644
--- a/tests/SRGBMipMapTest.cpp
+++ b/tests/SRGBMipMapTest.cpp
@@ -8,12 +8,13 @@
 #include "Test.h"
 #if SK_SUPPORT_GPU
 #include "GrCaps.h"
+#include "GrClip.h"
 #include "GrContext.h"
 #include "GrRenderTargetContext.h"
 #include "GrResourceProvider.h"
-#include "gl/GrGLGpu.h"
 #include "SkCanvas.h"
 #include "SkSurface.h"
+#include "gl/GrGLGpu.h"
 
 // using anonymous namespace because these functions are used as template params.
 namespace {
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp
index 548be4b..8579c4d 100644
--- a/tests/TessellatingPathRendererTests.cpp
+++ b/tests/TessellatingPathRendererTests.cpp
@@ -10,9 +10,10 @@
 #include "SkPath.h"
 
 #if SK_SUPPORT_GPU
+#include "GrClip.h"
 #include "GrContext.h"
-#include "ops/GrTessellatingPathRenderer.h"
 #include "SkGradientShader.h"
+#include "ops/GrTessellatingPathRenderer.h"
 
 /*
  * These tests pass by not crashing, hanging or asserting in Debug.