Use LinearStdAllocator in DisplayList
bug:24300128
This removes most of the remaining calls to malloc when
recording DisplayLists.
Change-Id: If928bd53dac0f145aadc436a62759086b67da0ed
diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp
index 4eb7066..59f0d7c 100644
--- a/libs/hwui/DisplayList.cpp
+++ b/libs/hwui/DisplayList.cpp
@@ -34,6 +34,17 @@
DisplayList::DisplayList()
: projectionReceiveIndex(-1)
+ , stdAllocator(allocator)
+ , chunks(stdAllocator)
+ , ops(stdAllocator)
+ , children(stdAllocator)
+ , bitmapResources(stdAllocator)
+ , pathResources(stdAllocator)
+ , patchResources(stdAllocator)
+ , paints(stdAllocator)
+ , regions(stdAllocator)
+ , referenceHolders(stdAllocator)
+ , functors(stdAllocator)
, hasDrawOps(false) {
}
@@ -68,9 +79,9 @@
}
size_t DisplayList::addChild(NodeOpType* op) {
- mReferenceHolders.push_back(op->renderNode);
- size_t index = mChildren.size();
- mChildren.push_back(op);
+ referenceHolders.push_back(op->renderNode);
+ size_t index = children.size();
+ children.push_back(op);
return index;
}