From 4e30623bdabfe392d5ef902666aad9be291cce73 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Wed, 8 Sep 2010 18:04:33 -0700 Subject: [PATCH] Purge Skia objects from GL caches as needed. Change-Id: I754c671cf790ad5ae8bf047ad328034217da4ecc --- include/utils/Singleton.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/utils/Singleton.h b/include/utils/Singleton.h index 3b975b4c4..e1ee8eb06 100644 --- a/include/utils/Singleton.h +++ b/include/utils/Singleton.h @@ -37,6 +37,11 @@ public: } return *instance; } + + static bool hasInstance() { + Mutex::Autolock _l(sLock); + return sInstance != 0; + } protected: ~Singleton() { };