aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrClearOp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/ops/GrClearOp.h')
-rw-r--r--src/gpu/ops/GrClearOp.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gpu/ops/GrClearOp.h b/src/gpu/ops/GrClearOp.h
index 59929b269a..6e76191dff 100644
--- a/src/gpu/ops/GrClearOp.h
+++ b/src/gpu/ops/GrClearOp.h
@@ -33,7 +33,7 @@ public:
SkString string;
string.append(INHERITED::dumpInfo());
string.appendf("Scissor [ ");
- if (fClip.scissorTest() == GrScissorTest::kEnabled) {
+ if (fClip.scissorEnabled()) {
const SkIRect& r = fClip.scissorRect();
string.appendf("L: %d, T: %d, R: %d, B: %d", r.fLeft, r.fTop, r.fRight, r.fBottom);
} else {
@@ -83,11 +83,9 @@ private:
bool contains(const GrClearOp* that) const {
// The constructor ensures that scissor gets disabled on any clip that fills the entire RT.
- if (fClip.scissorTest() == GrScissorTest::kDisabled) {
- return true;
- }
- return that->fClip.scissorTest() == GrScissorTest::kEnabled &&
- fClip.scissorRect().contains(that->fClip.scissorRect());
+ return !fClip.scissorEnabled() ||
+ (that->fClip.scissorEnabled() &&
+ fClip.scissorRect().contains(that->fClip.scissorRect()));
}
void onPrepare(GrOpFlushState*) override {}