diff options
Diffstat (limited to 'src/gpu/ops/GrClearOp.cpp')
-rw-r--r-- | src/gpu/ops/GrClearOp.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gpu/ops/GrClearOp.cpp b/src/gpu/ops/GrClearOp.cpp index 612ff2085d..52360dbe93 100644 --- a/src/gpu/ops/GrClearOp.cpp +++ b/src/gpu/ops/GrClearOp.cpp @@ -17,7 +17,8 @@ std::unique_ptr<GrClearOp> GrClearOp::Make(GrContext* context, GrColor color, GrSurfaceProxy* dstProxy) { const SkIRect rect = SkIRect::MakeWH(dstProxy->width(), dstProxy->height()); - if (clip.scissorEnabled() && !SkIRect::Intersects(clip.scissorRect(), rect)) { + if (clip.scissorTest() == GrScissorTest::kEnabled && + !SkIRect::Intersects(clip.scissorRect(), rect)) { return nullptr; } @@ -42,7 +43,7 @@ GrClearOp::GrClearOp(const GrFixedClip& clip, GrColor color, GrSurfaceProxy* pro , fClip(clip) , fColor(color) { const SkIRect rtRect = SkIRect::MakeWH(proxy->width(), proxy->height()); - if (fClip.scissorEnabled()) { + if (fClip.scissorTest() == GrScissorTest::kEnabled) { // Don't let scissors extend outside the RT. This may improve op combining. if (!fClip.intersect(rtRect)) { SkASSERT(0); // should be caught upstream @@ -53,8 +54,10 @@ GrClearOp::GrClearOp(const GrFixedClip& clip, GrColor color, GrSurfaceProxy* pro fClip.disableScissor(); } } - this->setBounds(SkRect::Make(fClip.scissorEnabled() ? fClip.scissorRect() : rtRect), - HasAABloat::kNo, IsZeroArea::kNo); + this->setBounds( + SkRect::Make(fClip.scissorTest() == GrScissorTest::kEnabled ? fClip.scissorRect() + : rtRect), + HasAABloat::kNo, IsZeroArea::kNo); } void GrClearOp::onExecute(GrOpFlushState* state) { |