summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2017-07-26 00:12:51 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-07-26 00:12:51 +0000
commitf44ebf5fcba4dc5f7021a3b72a8f26b11ae23db2 (patch)
treebbff29504e31acd8b213be7eba83f20307e981fc
parentd00de318f982372f82409df3ad245d65540c68d2 (diff)
parent13d7ddac23d21c3301c923e613b738436e3a8d49 (diff)
Merge "Silence a memory leak warning from the static analyzer"
-rw-r--r--libs/hwui/TessellationCache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/TessellationCache.cpp b/libs/hwui/TessellationCache.cpp
index d9e811684610..4ea440dd106f 100644
--- a/libs/hwui/TessellationCache.cpp
+++ b/libs/hwui/TessellationCache.cpp
@@ -416,7 +416,9 @@ TessellationCache::Buffer* TessellationCache::getOrCreateBuffer(
mProcessor = new TessellationProcessor(Caches::getInstance());
}
mProcessor->add(task);
- mCache.put(entry, buffer);
+ bool inserted = mCache.put(entry, buffer);
+ // Note to the static analyzer that this insert should always succeed.
+ LOG_ALWAYS_FATAL_IF(!inserted, "buffers shouldn't spontaneously appear in the cache");
}
return buffer;
}