diff options
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r-- | libs/hwui/RenderNode.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 8eb5e3d3dfbc..6761435a8171 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -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"); |