gpu: Dump GrTextBlobCache stats in memory dumps.
R=bsalomon@google.com
Bug:898910
Change-Id: I7458dde71f394faa42479dc55191edc9373eb774
Reviewed-on: https://skia-review.googlesource.com/c/165498
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Khusal Sagar <khushalsagar@chromium.org>
diff --git a/tests/TraceMemoryDumpTest.cpp b/tests/TraceMemoryDumpTest.cpp
index a5ec930..d7043a0 100644
--- a/tests/TraceMemoryDumpTest.cpp
+++ b/tests/TraceMemoryDumpTest.cpp
@@ -54,18 +54,19 @@
void ValidateMemoryDumps(skiatest::Reporter* reporter, GrContext* context, size_t size,
bool isOwned) {
+ // Note than one entry in the dumped objects is expected for the text blob cache.
TestSkTraceMemoryDump dump_with_wrapped(true /* shouldDumpWrappedObjects */);
context->dumpMemoryStatistics(&dump_with_wrapped);
- REPORTER_ASSERT(reporter, 1 == dump_with_wrapped.numDumpedObjects());
+ REPORTER_ASSERT(reporter, 2 == dump_with_wrapped.numDumpedObjects());
REPORTER_ASSERT(reporter, size == dump_with_wrapped.dumpedObjectsSize());
TestSkTraceMemoryDump dump_no_wrapped(false /* shouldDumpWrappedObjects */);
context->dumpMemoryStatistics(&dump_no_wrapped);
if (isOwned) {
- REPORTER_ASSERT(reporter, 1 == dump_no_wrapped.numDumpedObjects());
+ REPORTER_ASSERT(reporter, 2 == dump_no_wrapped.numDumpedObjects());
REPORTER_ASSERT(reporter, size == dump_no_wrapped.dumpedObjectsSize());
} else {
- REPORTER_ASSERT(reporter, 0 == dump_no_wrapped.numDumpedObjects());
+ REPORTER_ASSERT(reporter, 1 == dump_no_wrapped.numDumpedObjects());
REPORTER_ASSERT(reporter, 0 == dump_no_wrapped.dumpedObjectsSize());
}
}