summaryrefslogtreecommitdiffstats
path: root/core/jni/android/graphics/RtlProperties.h
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2011-02-24 19:56:18 -0800
committerFabrice Di Meglio <fdimeglio@google.com>2011-03-02 13:29:20 -0800
commitd313c665e618af3194f504064bcd284fe5368682 (patch)
treeafc941c310913e7ec79af8c50fb152b1281ba2ff /core/jni/android/graphics/RtlProperties.h
parent5fb008e3800032be18c6d5f1e7ace4d7c2661e26 (diff)
downloadframeworks_base-d313c665e618af3194f504064bcd284fe5368682.zip
frameworks_base-d313c665e618af3194f504064bcd284fe5368682.tar.gz
frameworks_base-d313c665e618af3194f504064bcd284fe5368682.tar.bz2
Add TextLayout Cache
- use GenerationCache for caching - move GenerationCache.h from libs/hwui/utils to include/utils - add #define for cache activation / deactivation Change-Id: Ifaf519f0b5e33b087a453e4aa6430162d8438f20
Diffstat (limited to 'core/jni/android/graphics/RtlProperties.h')
-rw-r--r--core/jni/android/graphics/RtlProperties.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/core/jni/android/graphics/RtlProperties.h b/core/jni/android/graphics/RtlProperties.h
new file mode 100644
index 0000000..6d8ba91
--- /dev/null
+++ b/core/jni/android/graphics/RtlProperties.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_RTL_PROPERTIES_H
+#define ANDROID_RTL_PROPERTIES_H
+
+#include <cutils/properties.h>
+#include <stdlib.h>
+
+namespace android {
+
+/**
+ * Debug level for app developers.
+ */
+#define RTL_PROPERTY_DEBUG "rtl.debug_level"
+
+/**
+ * Debug levels. Debug levels are used as flags.
+ */
+enum RtlDebugLevel {
+ kRtlDebugDisabled = 0,
+ kRtlDebugMemory = 1,
+ kRtlDebugCaches = 2,
+ kRtlDebugAllocations = 3
+};
+
+static RtlDebugLevel readRtlDebugLevel() {
+ char property[PROPERTY_VALUE_MAX];
+ if (property_get(RTL_PROPERTY_DEBUG, property, NULL) > 0) {
+ return (RtlDebugLevel) atoi(property);
+ }
+ return kRtlDebugDisabled;
+}
+
+} // namespace android
+#endif // ANDROID_RTL_PROPERTIES_H