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 /src/gpu | |
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>
Diffstat (limited to 'src/gpu')
-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 |
9 files changed, 31 insertions, 13 deletions
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; |