Improve dumping of display list memory usage
The first step of improving is measuring. So measure better. Bug: 138856108 Test: dump Change-Id: I076b904a1f0dfb209622c76bcb8778a10cd2b7db
This commit is contained in:
@@ -108,7 +108,7 @@ void RenderNode::output(std::ostream& output, uint32_t level) {
|
||||
output << std::endl;
|
||||
}
|
||||
|
||||
int RenderNode::getDebugSize() {
|
||||
int RenderNode::getUsageSize() {
|
||||
int size = sizeof(RenderNode);
|
||||
if (mStagingDisplayList) {
|
||||
size += mStagingDisplayList->getUsedSize();
|
||||
@@ -119,6 +119,18 @@ int RenderNode::getDebugSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
int RenderNode::getAllocatedSize() {
|
||||
int size = sizeof(RenderNode);
|
||||
if (mStagingDisplayList) {
|
||||
size += mStagingDisplayList->getAllocatedSize();
|
||||
}
|
||||
if (mDisplayList && mDisplayList != mStagingDisplayList) {
|
||||
size += mDisplayList->getAllocatedSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
void RenderNode::prepareTree(TreeInfo& info) {
|
||||
ATRACE_CALL();
|
||||
LOG_ALWAYS_FATAL_IF(!info.damageAccumulator, "DamageAccumulator missing");
|
||||
|
||||
Reference in New Issue
Block a user