use SkArenaAlloc for combineIfPossible
Now that GrOps no longer needs a GrMemoryPool to be
deleted, just pass down the the SkArenaAlloc instead
of both the GrMemoryPool and SkArenaAlloc.
The alloc is only used for two ops, but we pass it
to all the ops most of which don't use it.
Change-Id: I873efcdfe44b446f2ac5089ea8425dff257e318c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330118
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Herb Derby <herb@google.com>
diff --git a/src/gpu/GrOpsTask.cpp b/src/gpu/GrOpsTask.cpp
index 63eb290..a5753e8 100644
--- a/src/gpu/GrOpsTask.cpp
+++ b/src/gpu/GrOpsTask.cpp
@@ -188,7 +188,8 @@
bool canForwardMerge =
(a == chainA.tail()) || can_reorder(a->bounds(), forwardMergeBounds);
if (canForwardMerge || canBackwardMerge) {
- auto result = a->combineIfPossible(chainB.head(), arenas, caps);
+ auto result = a->combineIfPossible(
+ chainB.head(), arenas->recordTimeAllocator(), caps);
SkASSERT(result != GrOp::CombineResult::kCannotCombine);
merged = (result == GrOp::CombineResult::kMerged);
GrOP_INFO("\t\t: (%s opID: %u) -> Combining with (%s, opID: %u)\n",
@@ -265,7 +266,8 @@
SkDEBUGCODE(bool first = true;)
do {
- switch (fList.tail()->combineIfPossible(list->head(), arenas, caps)) {
+ switch (fList.tail()->combineIfPossible(list->head(), arenas->recordTimeAllocator(), caps))
+ {
case GrOp::CombineResult::kCannotCombine:
// If an op supports chaining then it is required that chaining is transitive and
// that if any two ops in two different chains can merge then the two chains