summaryrefslogtreecommitdiff
path: root/libs/hwui/TessellationCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/TessellationCache.cpp')
-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;
}