diff options
author | Robert Phillips <robertphillips@google.com> | 2017-06-15 14:01:04 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-15 18:27:28 +0000 |
commit | 009e9af5549301be41cfbd9f286ad90842e4096b (patch) | |
tree | 86cf6a0e309d16904c4243303c2ee46dde5b009e | |
parent | d5d323f45777c4766ddf4c74eedff36ee5d9bc56 (diff) |
Remove GrGpu.h from GrResourceProvider.h
Noticed this while cleaning up GrResourceProvider.h's usage. It seems like a powerful header to just be splashing around.
Change-Id: I686fea61354a7e3c1c759627ffe4a560f7945f83
Reviewed-on: https://skia-review.googlesource.com/20040
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
-rw-r--r-- | gn/gpu.gni | 1 | ||||
-rw-r--r-- | src/gpu/GrResourceProvider.h | 4 | ||||
-rw-r--r-- | src/gpu/GrSoftwarePathRenderer.cpp | 1 | ||||
-rw-r--r-- | src/gpu/GrTextureAdjuster.cpp | 1 | ||||
-rw-r--r-- | src/gpu/gl/GrGLGpuCommandBuffer.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLSemaphore.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLTextureRenderTarget.h | 2 | ||||
-rw-r--r-- | src/gpu/ops/GrMeshDrawOp.cpp | 1 | ||||
-rw-r--r-- | src/gpu/ops/GrStencilPathOp.cpp | 20 | ||||
-rw-r--r-- | src/gpu/ops/GrStencilPathOp.h | 11 | ||||
-rw-r--r-- | tests/CopySurfaceTest.cpp | 1 | ||||
-rw-r--r-- | tests/FloatingPointTextureTest.cpp | 1 | ||||
-rw-r--r-- | tests/GrMeshTest.cpp | 1 | ||||
-rw-r--r-- | tests/GrPipelineDynamicStateTest.cpp | 1 | ||||
-rw-r--r-- | tests/ImageFilterCacheTest.cpp | 2 | ||||
-rw-r--r-- | tests/PackedConfigsTextureTest.cpp | 1 | ||||
-rw-r--r-- | tests/ProxyConversionTest.cpp | 1 | ||||
-rw-r--r-- | tests/ProxyRefTest.cpp | 1 | ||||
-rw-r--r-- | tests/ReadWriteAlphaTest.cpp | 1 |
19 files changed, 42 insertions, 13 deletions
diff --git a/gn/gpu.gni b/gn/gpu.gni index 9dee9f5a54..fab5d971b4 100644 --- a/gn/gpu.gni +++ b/gn/gpu.gni @@ -282,6 +282,7 @@ skia_gpu_sources = [ "$_src/gpu/ops/GrSmallPathRenderer.h", "$_src/gpu/ops/GrStencilAndCoverPathRenderer.cpp", "$_src/gpu/ops/GrStencilAndCoverPathRenderer.h", + "$_src/gpu/ops/GrStencilPathOp.cpp", "$_src/gpu/ops/GrStencilPathOp.h", "$_src/gpu/ops/GrTessellatingPathRenderer.cpp", "$_src/gpu/ops/GrTessellatingPathRenderer.h", diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h index c2cb6dce9d..50264ef908 100644 --- a/src/gpu/GrResourceProvider.h +++ b/src/gpu/GrResourceProvider.h @@ -8,12 +8,14 @@ #ifndef GrResourceProvider_DEFINED #define GrResourceProvider_DEFINED +#include "GrBackendSurface.h" #include "GrBuffer.h" -#include "GrGpu.h" #include "GrPathRange.h" #include "SkImageInfo.h" +#include "SkScalerContext.h" class GrBackendRenderTarget; +class GrGpu; class GrPath; class GrRenderTarget; class GrSemaphore; diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp index 161b62bdf0..c98f1daef9 100644 --- a/src/gpu/GrSoftwarePathRenderer.cpp +++ b/src/gpu/GrSoftwarePathRenderer.cpp @@ -12,6 +12,7 @@ #include "GrPipelineBuilder.h" #include "GrResourceProvider.h" #include "GrSWMaskHelper.h" +#include "ops/GrDrawOp.h" #include "ops/GrRectOpFactory.h" //////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/GrTextureAdjuster.cpp b/src/gpu/GrTextureAdjuster.cpp index 86027dd933..be29857e3b 100644 --- a/src/gpu/GrTextureAdjuster.cpp +++ b/src/gpu/GrTextureAdjuster.cpp @@ -8,6 +8,7 @@ #include "GrTextureAdjuster.h" #include "GrContext.h" +#include "GrGpu.h" #include "GrResourceProvider.h" #include "SkGr.h" diff --git a/src/gpu/gl/GrGLGpuCommandBuffer.h b/src/gpu/gl/GrGLGpuCommandBuffer.h index c6e7208f4c..324b4d00d6 100644 --- a/src/gpu/gl/GrGLGpuCommandBuffer.h +++ b/src/gpu/gl/GrGLGpuCommandBuffer.h @@ -10,9 +10,9 @@ #include "GrGpuCommandBuffer.h" -#include "GrGLGpu.h" #include "GrOpFlushState.h" +class GrGLGpu; class GrGLRenderTarget; class GrGLGpuCommandBuffer : public GrGpuCommandBuffer { diff --git a/src/gpu/gl/GrGLSemaphore.h b/src/gpu/gl/GrGLSemaphore.h index 40dc53b396..f439ebd294 100644 --- a/src/gpu/gl/GrGLSemaphore.h +++ b/src/gpu/gl/GrGLSemaphore.h @@ -10,7 +10,7 @@ #include "GrSemaphore.h" -#include "GrGLGpu.h" +class GrGLGpu; class GrGLSemaphore : public GrSemaphore { public: diff --git a/src/gpu/gl/GrGLTextureRenderTarget.h b/src/gpu/gl/GrGLTextureRenderTarget.h index e6eb19512b..d74239ec14 100644 --- a/src/gpu/gl/GrGLTextureRenderTarget.h +++ b/src/gpu/gl/GrGLTextureRenderTarget.h @@ -13,8 +13,6 @@ #include "GrGLTexture.h" #include "GrGLRenderTarget.h" -class GrGLGpu; - #ifdef SK_BUILD_FOR_WIN // Windows gives bogus warnings about inheriting asTexture/asRenderTarget via dominance. #pragma warning(push) diff --git a/src/gpu/ops/GrMeshDrawOp.cpp b/src/gpu/ops/GrMeshDrawOp.cpp index d1367e9c9c..48f2ea67d3 100644 --- a/src/gpu/ops/GrMeshDrawOp.cpp +++ b/src/gpu/ops/GrMeshDrawOp.cpp @@ -5,6 +5,7 @@ * found in the LICENSE file. */ +#include "GrGpuCommandBuffer.h" #include "GrMeshDrawOp.h" #include "GrOpFlushState.h" #include "GrResourceProvider.h" diff --git a/src/gpu/ops/GrStencilPathOp.cpp b/src/gpu/ops/GrStencilPathOp.cpp new file mode 100644 index 0000000000..01042f6670 --- /dev/null +++ b/src/gpu/ops/GrStencilPathOp.cpp @@ -0,0 +1,20 @@ +/* + * Copyright 2017 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "GrStencilPathOp.h" + +#include "GrGpu.h" +#include "GrOpFlushState.h" + +void GrStencilPathOp::onExecute(GrOpFlushState* state) { + SkASSERT(state->drawOpArgs().fRenderTarget); + + GrPathRendering::StencilPathArgs args(fUseHWAA, state->drawOpArgs().fRenderTarget, + &fViewMatrix, &fScissor, &fStencil); + state->gpu()->pathRendering()->stencilPath(args, fPath.get()); +} + diff --git a/src/gpu/ops/GrStencilPathOp.h b/src/gpu/ops/GrStencilPathOp.h index 5b308f08e0..45240be4fd 100644 --- a/src/gpu/ops/GrStencilPathOp.h +++ b/src/gpu/ops/GrStencilPathOp.h @@ -9,11 +9,12 @@ #define GrStencilPathOp_DEFINED #include "GrOp.h" -#include "GrOpFlushState.h" #include "GrPath.h" #include "GrPathRendering.h" #include "GrStencilSettings.h" +class GrOpFlushState; + class GrStencilPathOp final : public GrOp { public: DEFINE_OP_CLASS_ID @@ -62,13 +63,7 @@ private: void onPrepare(GrOpFlushState*) override {} - void onExecute(GrOpFlushState* state) override { - SkASSERT(state->drawOpArgs().fRenderTarget); - - GrPathRendering::StencilPathArgs args(fUseHWAA, state->drawOpArgs().fRenderTarget, - &fViewMatrix, &fScissor, &fStencil); - state->gpu()->pathRendering()->stencilPath(args, fPath.get()); - } + void onExecute(GrOpFlushState* state) override; SkMatrix fViewMatrix; bool fUseHWAA; diff --git a/tests/CopySurfaceTest.cpp b/tests/CopySurfaceTest.cpp index 2e35256d78..8dfca0c3a5 100644 --- a/tests/CopySurfaceTest.cpp +++ b/tests/CopySurfaceTest.cpp @@ -14,6 +14,7 @@ #include "GrResourceProvider.h" #include "GrSurfaceContext.h" #include "GrSurfaceProxy.h" +#include "GrTextureProxy.h" #include "SkUtils.h" diff --git a/tests/FloatingPointTextureTest.cpp b/tests/FloatingPointTextureTest.cpp index ed68e91e4a..06a99a5f1c 100644 --- a/tests/FloatingPointTextureTest.cpp +++ b/tests/FloatingPointTextureTest.cpp @@ -19,6 +19,7 @@ #include "GrContext.h" #include "GrContextPriv.h" #include "GrResourceProvider.h" +#include "GrTextureProxy.h" #include "SkHalf.h" static const int DEV_W = 100, DEV_H = 100; diff --git a/tests/GrMeshTest.cpp b/tests/GrMeshTest.cpp index 0811982a54..e4663e1af0 100644 --- a/tests/GrMeshTest.cpp +++ b/tests/GrMeshTest.cpp @@ -12,6 +12,7 @@ #include "GrContext.h" #include "GrGeometryProcessor.h" +#include "GrGpuCommandBuffer.h" #include "GrOpFlushState.h" #include "GrRenderTargetContext.h" #include "GrRenderTargetContextPriv.h" diff --git a/tests/GrPipelineDynamicStateTest.cpp b/tests/GrPipelineDynamicStateTest.cpp index f3dd27316d..6c014000c7 100644 --- a/tests/GrPipelineDynamicStateTest.cpp +++ b/tests/GrPipelineDynamicStateTest.cpp @@ -13,6 +13,7 @@ #include "GrContext.h" #include "GrColor.h" #include "GrGeometryProcessor.h" +#include "GrGpuCommandBuffer.h" #include "GrOpFlushState.h" #include "GrRenderTargetContext.h" #include "GrRenderTargetContextPriv.h" diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp index 23341723ef..708857054a 100644 --- a/tests/ImageFilterCacheTest.cpp +++ b/tests/ImageFilterCacheTest.cpp @@ -181,8 +181,10 @@ DEF_TEST(ImageFilterCache_ImageBackedRaster, reporter) { #include "GrContext.h" #include "GrContextPriv.h" #include "GrResourceProvider.h" +#include "GrSurfaceProxyPriv.h" #include "GrTest.h" #include "GrTexture.h" +#include "GrTextureProxy.h" static sk_sp<GrTextureProxy> create_proxy(GrResourceProvider* resourceProvider) { SkBitmap srcBM = create_bm(); diff --git a/tests/PackedConfigsTextureTest.cpp b/tests/PackedConfigsTextureTest.cpp index 916f27a04a..f91fc428e6 100644 --- a/tests/PackedConfigsTextureTest.cpp +++ b/tests/PackedConfigsTextureTest.cpp @@ -17,6 +17,7 @@ #include "GrContext.h" #include "GrContextPriv.h" #include "GrResourceProvider.h" +#include "GrTextureProxy.h" static const int DEV_W = 10, DEV_H = 10; static const SkIRect DEV_RECT = SkIRect::MakeWH(DEV_W, DEV_H); diff --git a/tests/ProxyConversionTest.cpp b/tests/ProxyConversionTest.cpp index 98f0985e03..513b680045 100644 --- a/tests/ProxyConversionTest.cpp +++ b/tests/ProxyConversionTest.cpp @@ -11,6 +11,7 @@ #if SK_SUPPORT_GPU #include "GrBackendSurface.h" +#include "GrRenderTarget.h" #include "GrRenderTargetProxy.h" #include "GrResourceProvider.h" #include "GrSurfaceProxy.h" diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp index 61e57209ce..04510b3e7f 100644 --- a/tests/ProxyRefTest.cpp +++ b/tests/ProxyRefTest.cpp @@ -11,6 +11,7 @@ #if SK_SUPPORT_GPU #include "GrContextPriv.h" +#include "GrGpuResourceRef.h" #include "GrRenderTargetProxy.h" #include "GrResourceProvider.h" #include "GrSurfaceProxy.h" diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp index 531159ff6f..344400cca7 100644 --- a/tests/ReadWriteAlphaTest.cpp +++ b/tests/ReadWriteAlphaTest.cpp @@ -15,6 +15,7 @@ #include "GrResourceProvider.h" #include "GrSurfaceContext.h" #include "GrSurfaceProxy.h" +#include "GrTextureProxy.h" #include "SkCanvas.h" #include "SkSurface.h" |