Merge "Silence a memory leak warning from the static analyzer"
diff --git a/libs/hwui/TessellationCache.cpp b/libs/hwui/TessellationCache.cpp
index d9e8116..4ea440d 100644
--- a/libs/hwui/TessellationCache.cpp
+++ b/libs/hwui/TessellationCache.cpp
@@ -416,7 +416,9 @@
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;
}