Correctly release the OpenGL Canvas on EGL error.
Change-Id: Ib31fd8445f7ce5f7aa7e0205de0e7db80d024fc2
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp
index f2f1adb..0b6c7b5 100644
--- a/libs/hwui/ProgramCache.cpp
+++ b/libs/hwui/ProgramCache.cpp
@@ -298,6 +298,8 @@
///////////////////////////////////////////////////////////////////////////////
void ProgramCache::clear() {
+ PROGRAM_LOGD("Clearing program cache");
+
size_t count = mCache.size();
for (size_t i = 0; i < count; i++) {
delete mCache.valueAt(i);