No longer round the non-AA clip bounds
By no longer rounding the non-AA clip bounds we increase the probability that a non-AA clip will be dropped when applied to a non-AA rect draw (particularly at half pixel translations).
To make this work in practice we must also make the clip stack check if the non-AA clip is relevant before we preemptively employ a scissor clip.
Note that I have verified that this removes the gross clipping errors from the Chrome repo case but the rounding to scissor clip behavior could still happen in other cases.
Bug: 906496
Change-Id: Iba51b9061fb434144e3a9b3fd91479109fcf67f4
Reviewed-on: https://skia-review.googlesource.com/c/182141
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp
index b77f906..5e4db11 100644
--- a/src/gpu/GrRenderTargetOpList.cpp
+++ b/src/gpu/GrRenderTargetOpList.cpp
@@ -177,7 +177,7 @@
auto result = a->combineIfPossible(chainB.head(), caps);
SkASSERT(result != GrOp::CombineResult::kCannotCombine);
merged = (result == GrOp::CombineResult::kMerged);
- GrOP_INFO("\t\t%d: (%s opID: %u) -> Combining with (%s, opID: %u)\n", i,
+ GrOP_INFO("\t\t: (%s opID: %u) -> Combining with (%s, opID: %u)\n",
chainB.head()->name(), chainB.head()->uniqueID(), a->name(),
a->uniqueID());
}
@@ -254,7 +254,7 @@
chainA = DoConcat(std::move(chainA), std::move(chainB), caps, pool, auditTrail);
return std::tuple<List, List>(std::move(chainA), List());
case GrOp::CombineResult::kMerged: {
- GrOP_INFO("\t\t%d: (%s opID: %u) -> Combining with (%s, opID: %u)\n", i,
+ GrOP_INFO("\t\t: (%s opID: %u) -> Combining with (%s, opID: %u)\n",
chainB.tail()->name(), chainB.tail()->uniqueID(), chainB.head()->name(),
chainB.head()->uniqueID());
GR_AUDIT_TRAIL_OPS_RESULT_COMBINED(auditTrail, chainA.tail(), chainB.head());