aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrClearOp.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-06-15 12:07:18 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-15 17:18:19 +0000
commitfbcef6eb8abad142daf45418516550f7635b4a52 (patch)
tree1fb2b2a1df72ba87ec05a91bd1cd271e24b5544e /src/gpu/ops/GrClearOp.h
parentbaaf439eb5d08097d794f13800e5bf7ce8885f95 (diff)
Clean up GrResourceProvider usage
The only substantive changes are the removal of GrProxy instantiation in: SkGpuBlurUtils::GaussianBlur GrSimpleTextureEffect::Make* Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc Reviewed-on: https://skia-review.googlesource.com/19965 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/ops/GrClearOp.h')
-rw-r--r--src/gpu/ops/GrClearOp.h32
1 files changed, 4 insertions, 28 deletions
diff --git a/src/gpu/ops/GrClearOp.h b/src/gpu/ops/GrClearOp.h
index 6d0cf28775..56ecb13a79 100644
--- a/src/gpu/ops/GrClearOp.h
+++ b/src/gpu/ops/GrClearOp.h
@@ -9,10 +9,9 @@
#define GrClearOp_DEFINED
#include "GrFixedClip.h"
-#include "GrGpuCommandBuffer.h"
#include "GrOp.h"
-#include "GrOpFlushState.h"
-#include "GrResourceProvider.h"
+
+class GrOpFlushState;
class GrClearOp final : public GrOp {
public:
@@ -55,26 +54,7 @@ public:
void setColor(GrColor color) { fColor = color; }
private:
- GrClearOp(const GrFixedClip& clip, GrColor color, GrSurfaceProxy* proxy)
- : INHERITED(ClassID())
- , fClip(clip)
- , fColor(color) {
-
- const SkIRect rtRect = SkIRect::MakeWH(proxy->width(), proxy->height());
- if (fClip.scissorEnabled()) {
- // Don't let scissors extend outside the RT. This may improve op combining.
- if (!fClip.intersect(rtRect)) {
- SkASSERT(0); // should be caught upstream
- fClip = GrFixedClip(SkIRect::MakeEmpty());
- }
-
- if (GrResourceProvider::IsFunctionallyExact(proxy) && fClip.scissorRect() == rtRect) {
- fClip.disableScissor();
- }
- }
- this->setBounds(SkRect::Make(fClip.scissorEnabled() ? fClip.scissorRect() : rtRect),
- HasAABloat::kNo, IsZeroArea::kNo);
- }
+ GrClearOp(const GrFixedClip& clip, GrColor color, GrSurfaceProxy* proxy);
GrClearOp(const SkIRect& rect, GrColor color, bool fullScreen)
: INHERITED(ClassID())
@@ -115,11 +95,7 @@ private:
void onPrepare(GrOpFlushState*) override {}
- void onExecute(GrOpFlushState* state) override {
- SkASSERT(state->drawOpArgs().fRenderTarget);
-
- state->commandBuffer()->clear(state->drawOpArgs().fRenderTarget, fClip, fColor);
- }
+ void onExecute(GrOpFlushState* state) override;
GrFixedClip fClip;
GrColor fColor;