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/ops/GrOp.cpp b/src/gpu/ops/GrOp.cpp
index e635d81..f115d4c 100644
--- a/src/gpu/ops/GrOp.cpp
+++ b/src/gpu/ops/GrOp.cpp
@@ -39,13 +39,12 @@
SkDEBUGCODE(fBoundsFlags = kUninitialized_BoundsFlag);
}
-GrOp::CombineResult GrOp::combineIfPossible(GrOp* that, GrRecordingContext::Arenas* arenas,
- const GrCaps& caps) {
+GrOp::CombineResult GrOp::combineIfPossible(GrOp* that, SkArenaAlloc* alloc, const GrCaps& caps) {
SkASSERT(this != that);
if (this->classID() != that->classID()) {
return CombineResult::kCannotCombine;
}
- auto result = this->onCombineIfPossible(that, arenas, caps);
+ auto result = this->onCombineIfPossible(that, alloc, caps);
if (result == CombineResult::kMerged) {
this->joinBounds(*that);
}