Fix audit trail when ops merge after chaining change.
This fixes a crash in skiaserve when running in GPU mode.
Remove GR_AUDIT_TRAIL_OP_RESULT_NEW. This macro doesn't do anything and
is non-trivial to know when to call if a new op gets chained.
Change-Id: Ic2a9c09e3d15541a566534654b2393cb740fa302
Reviewed-on: https://skia-review.googlesource.com/c/172864
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp
index 010fe6c..1eec9d8 100644
--- a/src/gpu/GrRenderTargetOpList.cpp
+++ b/src/gpu/GrRenderTargetOpList.cpp
@@ -180,9 +180,9 @@
GrOP_INFO("\t\t%d: (%s opID: %u) -> Combining with (%s, opID: %u)\n", i,
chainB.head()->name(), chainB.head()->uniqueID(), a->name(),
a->uniqueID());
- GR_AUDIT_TRAIL_OPS_RESULT_COMBINED(auditTrail, chainB.head(), a);
}
if (merged) {
+ GR_AUDIT_TRAIL_OPS_RESULT_COMBINED(auditTrail, a, chainB.head());
if (canBackwardMerge) {
pool->release(chainB.popHead());
} else {
@@ -662,7 +662,6 @@
} else {
GrOP_INFO("\t\tBackward: FirstOp\n");
}
- GR_AUDIT_TRAIL_OP_RESULT_NEW(fAuditTrail, op);
if (clip) {
clip = fClipAllocator.make<GrAppliedClip>(std::move(*clip));
SkDEBUGCODE(fNumClips++;)