Rename opPODAllocator to recordTimeAllocator
Hopefully this is a better name. "POD" is no longer accurate since we are storing GrPipeline's in this arena.
Bug: skia:9455
Change-Id: I610267633088b0af4f0cbb36f479bf5eb6c6d0cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254992
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/gm/clockwise.cpp b/gm/clockwise.cpp
index 1844578..47a6e48 100644
--- a/gm/clockwise.cpp
+++ b/gm/clockwise.cpp
@@ -160,7 +160,7 @@
const GrAppliedClip*) final {
// We're going to create the GrProgramInfo (and the GrPipeline it relies on) in the
// DDL-record-time arena.
- SkArenaAlloc* arena = context->priv().opPODAllocator();
+ SkArenaAlloc* arena = context->priv().recordTimeAllocator();
// Not POD! It has some sk_sp's buried inside it!
GrPipeline* pipeline = arena->make<GrPipeline>(GrScissorTest::kDisabled, SkBlendMode::kPlus,
diff --git a/include/private/GrRecordingContext.h b/include/private/GrRecordingContext.h
index 39d851c..10d281b 100644
--- a/include/private/GrRecordingContext.h
+++ b/include/private/GrRecordingContext.h
@@ -50,10 +50,10 @@
sk_sp<GrOpMemoryPool> refOpMemoryPool();
GrOpMemoryPool* opMemoryPool();
- SkArenaAlloc* opPODAllocator();
- // This entry point should only be used for DDL creation where we want the ops' POD lifetime
+ SkArenaAlloc* recordTimeAllocator();
+ // This entry point should only be used for DDL creation where we want the ops' data's lifetime
// to match that of the DDL.
- std::unique_ptr<SkArenaAlloc> detachOpPOD();
+ std::unique_ptr<SkArenaAlloc> detachRecordTimeAllocator();
GrStrikeCache* getGrStrikeCache() { return fStrikeCache.get(); }
GrTextBlobCache* getTextBlobCache();
@@ -131,7 +131,7 @@
std::unique_ptr<GrDrawingManager> fDrawingManager;
// All the GrOp-derived classes use this pool.
sk_sp<GrOpMemoryPool> fOpMemoryPool;
- std::unique_ptr<SkArenaAlloc> fOpPODAllocator;
+ std::unique_ptr<SkArenaAlloc> fRecordTimeAllocator;
std::unique_ptr<GrStrikeCache> fStrikeCache;
std::unique_ptr<GrTextBlobCache> fTextBlobCache;
diff --git a/include/private/SkDeferredDisplayList.h b/include/private/SkDeferredDisplayList.h
index b90995c..ccf1d08 100644
--- a/include/private/SkDeferredDisplayList.h
+++ b/include/private/SkDeferredDisplayList.h
@@ -71,7 +71,7 @@
SkTArray<sk_sp<GrRenderTask>> fRenderTasks;
PendingPathsMap fPendingPaths; // This is the path data from CCPR.
- std::unique_ptr<SkArenaAlloc> fOpPOD;
+ std::unique_ptr<SkArenaAlloc> fRecordTimeData;
#endif
sk_sp<LazyProxyData> fLazyProxyData;
};
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index d75b464..8ab0c1a 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -581,7 +581,7 @@
renderTask->prePrepare(fContext);
}
- ddl->fOpPOD = fContext->priv().detachOpPOD();
+ ddl->fRecordTimeData = fContext->priv().detachRecordTimeAllocator();
if (fPathRendererChain) {
if (auto ccpr = fPathRendererChain->getCoverageCountingPathRenderer()) {
diff --git a/src/gpu/GrRecordingContext.cpp b/src/gpu/GrRecordingContext.cpp
index 58eb8c5..b7f9d46 100644
--- a/src/gpu/GrRecordingContext.cpp
+++ b/src/gpu/GrRecordingContext.cpp
@@ -137,18 +137,20 @@
// Stored in this arena:
// GrTextureOp's DynamicStateArrays and FixedDynamicState
-SkArenaAlloc* GrRecordingContext::opPODAllocator() {
- if (!fOpPODAllocator) {
+// some GrGeometryProcessors, GrPipelines and GrProgramInfos
+SkArenaAlloc* GrRecordingContext::recordTimeAllocator() {
+ if (!fRecordTimeAllocator) {
// TODO: empirically determine a better number for SkArenaAlloc's firstHeapAllocation param
- fOpPODAllocator = std::unique_ptr<SkArenaAlloc>(new SkArenaAlloc(sizeof(GrPipeline) * 100));
+ fRecordTimeAllocator = std::unique_ptr<SkArenaAlloc>(
+ new SkArenaAlloc(sizeof(GrPipeline) * 100));
}
- SkASSERT(fOpPODAllocator);
- return fOpPODAllocator.get();
+ SkASSERT(fRecordTimeAllocator);
+ return fRecordTimeAllocator.get();
}
-std::unique_ptr<SkArenaAlloc> GrRecordingContext::detachOpPOD() {
- return std::move(fOpPODAllocator);
+std::unique_ptr<SkArenaAlloc> GrRecordingContext::detachRecordTimeAllocator() {
+ return std::move(fRecordTimeAllocator);
}
GrTextBlobCache* GrRecordingContext::getTextBlobCache() {
@@ -322,8 +324,8 @@
return fContext->refCaps();
}
-std::unique_ptr<SkArenaAlloc> GrRecordingContextPriv::detachOpPOD() {
- return fContext->detachOpPOD();
+std::unique_ptr<SkArenaAlloc> GrRecordingContextPriv::detachRecordTimeAllocator() {
+ return fContext->detachRecordTimeAllocator();
}
sk_sp<GrSkSLFPFactoryCache> GrRecordingContextPriv::fpFactoryCache() {
diff --git a/src/gpu/GrRecordingContextPriv.h b/src/gpu/GrRecordingContextPriv.h
index dfaf914..c11873d 100644
--- a/src/gpu/GrRecordingContextPriv.h
+++ b/src/gpu/GrRecordingContextPriv.h
@@ -46,8 +46,8 @@
sk_sp<GrOpMemoryPool> refOpMemoryPool();
GrOpMemoryPool* opMemoryPool() { return fContext->opMemoryPool(); }
- SkArenaAlloc* opPODAllocator() { return fContext->opPODAllocator(); }
- std::unique_ptr<SkArenaAlloc> detachOpPOD();
+ SkArenaAlloc* recordTimeAllocator() { return fContext->recordTimeAllocator(); }
+ std::unique_ptr<SkArenaAlloc> detachRecordTimeAllocator();
GrStrikeCache* getGrStrikeCache() { return fContext->getGrStrikeCache(); }
GrTextBlobCache* getTextBlobCache() { return fContext->getTextBlobCache(); }
diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp
index 91515c4..85faf9d 100644
--- a/src/gpu/ops/GrTextureOp.cpp
+++ b/src/gpu/ops/GrTextureOp.cpp
@@ -523,7 +523,7 @@
SkDEBUGCODE(this->validate();)
SkASSERT(!fPrePreparedDesc);
- SkArenaAlloc* arena = context->priv().opPODAllocator();
+ SkArenaAlloc* arena = context->priv().recordTimeAllocator();
fPrePreparedDesc = arena->make<PrePreparedDesc>();