Reland "Fix texture barriers on DMSAA"
This reverts commit 9a2d3d1e19e7bd15f7aa0c054197c980eb356477.
Reason for revert: relanding with fix
Original change's description:
> Revert "Fix texture barriers on DMSAA"
>
> This reverts commit 1a3f4ab4901c2294d13c785717655ce059eb42fa.
>
> Reason for revert: breaking dmsaa test on intel hd405, https://ci.chromium.org/raw/build/logs.chromium.org/skia/54538c41f1c1b111/+/annotations
>
> Original change's description:
> > Fix texture barriers on DMSAA
> >
> > Bug: skia:11396
> > Change-Id: Iad74958c05ed086fe85656b9dc5418d5ab4589e7
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419838
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com
>
> Change-Id: I8be8107a98584dfb7f831a296078753fecfcebcf
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:11396
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421056
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
# Not skipping CQ checks because this is a reland.
Bug: skia:11396
Change-Id: I6c65a3639e87b32a30774f33445bb3174a4fdffa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421058
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 6c71c4d..109aac0 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -373,14 +373,14 @@
#ifdef SK_DEBUG
// This block checks for any unnecessary splits in the opsTasks. If two sequential opsTasks
- // share the same backing GrSurfaceProxy it means the opsTask was artificially split.
+ // could have merged it means the opsTask was artificially split.
if (!fDAG.empty()) {
GrOpsTask* prevOpsTask = fDAG[0]->asOpsTask();
for (int i = 1; i < fDAG.count(); ++i) {
GrOpsTask* curOpsTask = fDAG[i]->asOpsTask();
if (prevOpsTask && curOpsTask) {
- SkASSERT(prevOpsTask->target(0) != curOpsTask->target(0));
+ SkASSERT(!prevOpsTask->canMerge(curOpsTask));
}
prevOpsTask = curOpsTask;