summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Caches.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-09-27 17:55:46 -0700
committerRomain Guy <romainguy@google.com>2012-09-27 17:57:24 -0700
commit54c1a64d5441a964890b44280e4457e11f4f924a (patch)
tree31e8837991a90927dfa925246df31b8e6ee36a18 /libs/hwui/Caches.cpp
parentd9730390c6bbac09107866462b9bf45d0b5706cf (diff)
downloadframeworks_base-54c1a64d5441a964890b44280e4457e11f4f924a.zip
frameworks_base-54c1a64d5441a964890b44280e4457e11f4f924a.tar.gz
frameworks_base-54c1a64d5441a964890b44280e4457e11f4f924a.tar.bz2
Don't use the QCOM_tiled_rendering extension with functors
Bug #7247880 Change-Id: I4f6c38e37b953c58e6107097c613891a49dac766
Diffstat (limited to 'libs/hwui/Caches.cpp')
-rw-r--r--libs/hwui/Caches.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index f0f72f9..442c4fb 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -86,6 +86,8 @@ void Caches::init() {
lastDstMode = GL_ZERO;
currentProgram = NULL;
+ mFunctorsCount = 0;
+
mInitialized = true;
}
@@ -454,6 +456,22 @@ void Caches::endTiling() {
}
}
+bool Caches::hasRegisteredFunctors() {
+ return mFunctorsCount > 0;
+}
+
+void Caches::registerFunctors(uint32_t functorCount) {
+ mFunctorsCount += functorCount;
+}
+
+void Caches::unregisterFunctors(uint32_t functorCount) {
+ if (functorCount > mFunctorsCount) {
+ mFunctorsCount = 0;
+ } else {
+ mFunctorsCount -= functorCount;
+ }
+}
+
///////////////////////////////////////////////////////////////////////////////
// Regions
///////////////////////////////////////////////////////////////////////////////