Remove pre-allocated clip space from GrRenderTargetOpList
It seems like this should be safe (perf-regression-wise) since the arena allocated clips are used infrequently.
In the following, each GM run has 621 srcs and a total of 81087 ops.
Each skp run has 87 srcs and a total of 14709 ops.
The following table shows how many times the arena allocator is called for each config/src.
Overall, I think is safe to only allocate the arena-allocated space on an as needed basis.
gl-gm: 0
gl-skp: 0
gl-msaa4: 0
gl-msaa4: 0
glinst-gm: 1225
glinst-skp: 579
glnvpr4-gm: 623
glnvpr4-skp: 77
Change-Id: I78e04b060b6ad3b78697519249bb4b9c3193fc85
Reviewed-on: https://skia-review.googlesource.com/14392
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrRenderTargetOpList.h b/src/gpu/GrRenderTargetOpList.h
index 4b3f0d0..342f927 100644
--- a/src/gpu/GrRenderTargetOpList.h
+++ b/src/gpu/GrRenderTargetOpList.h
@@ -150,8 +150,9 @@
SkSTArray<256, RecordedOp, true> fRecordedOps;
- char fClipAllocatorStorage[4096];
- SkArenaAlloc fClipAllocator;
+ // MDB TODO: 4096 for the first allocation of the clip space will be huge overkill.
+ // Gather statistics to determine the correct size.
+ SkArenaAlloc fClipAllocator{4096};
typedef GrOpList INHERITED;
};