Enforce non-overlap constraint from GrRenderTargetOpList

Enforces this constraint from one central location, rather than
relying on each Op to remember to check if overlap is allowed from its
onCombineIfPossible method.

Fixes an issue where we need to check the total bounds of both chains
for overlap (not the bounds of individual Ops).

Bug: skia:8671
Change-Id: I163651c868847884459acfc00d13ffdfca3a27c3
Reviewed-on: https://skia-review.googlesource.com/c/185815
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp
index 7066a02..6005be5 100644
--- a/tests/GrPorterDuffTest.cpp
+++ b/tests/GrPorterDuffTest.cpp
@@ -88,6 +88,11 @@
                          !caps.shaderCaps()->dstReadInShaderSupport() &&
                          (SkBlendMode::kSrcOver != xfermode ||
                           !inputColor.isOpaque())));
+            // Porter Duff modes currently only use fixed-function or shader blending, and Ganesh
+            // doesn't yet make use of framebuffer fetches that require a barrier
+            // (e.g., QCOM_shader_framebuffer_fetch_noncoherent). So dst textures and xfer barriers
+            // should always go hand in hand for Porter Duff modes.
+            TEST_ASSERT(analysis.requiresDstTexture() == analysis.requiresNonOverlappingDraws());
             GetXPOutputTypes(xp.get(), &fPrimaryOutputType, &fSecondaryOutputType);
             xp->getBlendInfo(&fBlendInfo);
             TEST_ASSERT(!xp->willReadDstColor() ||