diff options
Diffstat (limited to 'libs/hwui/pipeline/skia/SkiaMemoryTracer.cpp')
| -rw-r--r-- | libs/hwui/pipeline/skia/SkiaMemoryTracer.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaMemoryTracer.cpp b/libs/hwui/pipeline/skia/SkiaMemoryTracer.cpp index 0b995bc295de..10427039c35a 100644 --- a/libs/hwui/pipeline/skia/SkiaMemoryTracer.cpp +++ b/libs/hwui/pipeline/skia/SkiaMemoryTracer.cpp @@ -86,12 +86,9 @@ void SkiaMemoryTracer::processElement() { } } - // if we don't have a resource name then we don't know how to label the - // data and should abort. + // if we don't have a pretty name then use the dumpName if (resourceName == nullptr) { - mCurrentElement.clear(); - mCurrentValues.clear(); - return; + resourceName = mCurrentElement.c_str(); } auto result = mResults.find(resourceName); @@ -157,6 +154,14 @@ void SkiaMemoryTracer::logOutput(String8& log) { } } +size_t SkiaMemoryTracer::total() { + processElement(); + if (!strcmp("bytes", mTotalSize.units)) { + return mTotalSize.value; + } + return 0; +} + void SkiaMemoryTracer::logTotals(String8& log) { TraceValue total = convertUnits(mTotalSize); TraceValue purgeable = convertUnits(mPurgeableSize); |
