Don't batch across domain modes in GrTextureOp
Change-Id: I3ea0f521dbfccf183fd55e850aeafe641ec28002
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209324
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp
index 6426199..daa2db1 100644
--- a/src/gpu/ops/GrTextureOp.cpp
+++ b/src/gpu/ops/GrTextureOp.cpp
@@ -557,6 +557,12 @@
CombineResult onCombineIfPossible(GrOp* t, const GrCaps& caps) override {
TRACE_EVENT0("skia", TRACE_FUNC);
const auto* that = t->cast<TextureOp>();
+ if (fDomain != that->fDomain) {
+ // It is technically possible to combine operations across domain modes, but performance
+ // testing suggests it's better to make more draw calls where some take advantage of
+ // the more optimal shader path without coordinate clamping.
+ return CombineResult::kCannotCombine;
+ }
if (!GrColorSpaceXform::Equals(fTextureColorSpaceXform.get(),
that->fTextureColorSpaceXform.get())) {
return CombineResult::kCannotCombine;