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/ops | |
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/ops')
-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 |
3 files changed, 24 insertions, 8 deletions
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; |