1d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio/* 2d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * Copyright (C) 2011 The Android Open Source Project 3d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * 4d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * Licensed under the Apache License, Version 2.0 (the "License"); 5d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * you may not use this file except in compliance with the License. 6d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * You may obtain a copy of the License at 7d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * 8d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * http://www.apache.org/licenses/LICENSE-2.0 9d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * 10d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * Unless required by applicable law or agreed to in writing, software 11d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * distributed under the License is distributed on an "AS IS" BASIS, 12d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * See the License for the specific language governing permissions and 14d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * limitations under the License. 15d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio */ 16d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio 17d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio#ifndef ANDROID_RTL_PROPERTIES_H 18d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio#define ANDROID_RTL_PROPERTIES_H 19d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio 20d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio#include <cutils/properties.h> 21d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio#include <stdlib.h> 22d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio 23d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglionamespace android { 24d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio 25d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio/** 26d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * Debug level for app developers. 27d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio */ 28d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio#define RTL_PROPERTY_DEBUG "rtl.debug_level" 29d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio 30d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio/** 31d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio * Debug levels. Debug levels are used as flags. 32d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio */ 33d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglioenum RtlDebugLevel { 34d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio kRtlDebugDisabled = 0, 35d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio kRtlDebugMemory = 1, 36d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio kRtlDebugCaches = 2, 37d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio kRtlDebugAllocations = 3 38d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio}; 39d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio 40d313c665e618af3194f504064bcd284fe5368682Fabrice Di Megliostatic RtlDebugLevel readRtlDebugLevel() { 41d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio char property[PROPERTY_VALUE_MAX]; 42d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio if (property_get(RTL_PROPERTY_DEBUG, property, NULL) > 0) { 43d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio return (RtlDebugLevel) atoi(property); 44d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio } 45d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio return kRtlDebugDisabled; 46d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio} 47d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio 48eee49c699c035ffba188417489f40d34f587d65cFabrice Di Meglio// Define if we want to use Harfbuzz (1) or not (0) 499f82b580d744ce4baf057b061994394dcf239eedFabrice Di Meglio#define RTL_USE_HARFBUZZ 1 509f82b580d744ce4baf057b061994394dcf239eedFabrice Di Meglio 51eee49c699c035ffba188417489f40d34f587d65cFabrice Di Meglio// Define if we want (1) to have Advances debug values or not (0) 52eee49c699c035ffba188417489f40d34f587d65cFabrice Di Meglio#define DEBUG_ADVANCES 0 53eee49c699c035ffba188417489f40d34f587d65cFabrice Di Meglio 54fcf2be1846935e7983ea2fe87fdd4d7af27764b6Fabrice Di Meglio// Define if we want (1) to have Glyphs debug values or not (0) 5506732fde78b1caf8b5e6c0ef93357cfacedd1823Fabrice Di Meglio#define DEBUG_GLYPHS 0 56eee49c699c035ffba188417489f40d34f587d65cFabrice Di Meglio 57d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio} // namespace android 58d313c665e618af3194f504064bcd284fe5368682Fabrice Di Meglio#endif // ANDROID_RTL_PROPERTIES_H 59