summaryrefslogtreecommitdiff
path: root/libs/hwui/Caches.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2012-09-27 18:45:42 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2012-09-27 18:45:42 -0700
commita852ff3a4b637e8101c2f54e110467586fe604cf (patch)
tree0c940ea5314930c6fdbe15bfc1f4cc17c61d1b78 /libs/hwui/Caches.cpp
parent93aa70c6dfec91909404c9ade9b4a94574814092 (diff)
parent6ed9e43879039ce0cbead08d304edbce79a88ced (diff)
Merge changes I9873540e,I4f6c38e3 into jb-mr1-dev
* changes: Skia's ColorMatrix vector is in the 0..255 range not 0..1 Bug #7248980 Don't use the QCOM_tiled_rendering extension with functors Bug #7247880
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 2883f378df89..e44329404190 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -87,6 +87,8 @@ void Caches::init() {
lastDstMode = GL_ZERO;
currentProgram = NULL;
+ mFunctorsCount = 0;
+
mInitialized = true;
}
@@ -458,6 +460,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
///////////////////////////////////////////////////////////////////////////////