summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Properties.h
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-07-18 15:50:29 -0700
committerRomain Guy <romainguy@google.com>2012-07-18 16:28:44 -0700
commit6e25e38e43f9e7f71397dfab7ed32c81c7bf7d46 (patch)
tree0bca4ce1b09dee6f3bfeb941ca324b4ca91a1eff /libs/hwui/Properties.h
parentaccf721ebdf4d3da53e8ae09572650775bfe10f8 (diff)
downloadframeworks_base-6e25e38e43f9e7f71397dfab7ed32c81c7bf7d46.zip
frameworks_base-6e25e38e43f9e7f71397dfab7ed32c81c7bf7d46.tar.gz
frameworks_base-6e25e38e43f9e7f71397dfab7ed32c81c7bf7d46.tar.bz2
Add a new method for text gamma correction
To select the gamma correction method, adb shell setprop hwui.text_gamma_correction with one of the following values: lookup3 lookup shader3 shader See Properties.h for more information about these different methods. You can also control gamma correction using the following properties: hwui.text_gamma hwui.text_gamma.black_threshold hwui.text_gamma.white_threshold Change-Id: I47970b804d2c590c37d3da5008db094241579e25
Diffstat (limited to 'libs/hwui/Properties.h')
-rw-r--r--libs/hwui/Properties.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h
index 4a12e39..447b1d0 100644
--- a/libs/hwui/Properties.h
+++ b/libs/hwui/Properties.h
@@ -74,13 +74,28 @@ enum DebugLevel {
#define PROPERTY_TEXT_CACHE_HEIGHT "ro.hwui.text_cache_height"
// Indicates whether gamma correction should be applied in the shaders
-// or in lookup tables. Accepted values: true, false
-#define PROPERTY_TEXT_GAMMA_SHADER "ro.hwui.text_gamma_shader"
+// or in lookup tables. Accepted values:
+//
+// - "lookup3", correction based on lookup tables. Gamma correction
+// is different for black and white text (see thresholds below)
+//
+// - "lookup", correction based on a single lookup table
+//
+// - "shader3", correction applied by a GLSL shader. Gamma correction
+// is different for black and white text (see thresholds below)
+//
+// - "shader", correction applied by a GLSL shader
+//
+// See PROPERTY_TEXT_GAMMA, PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD and
+// PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD for more control.
+#define PROPERTY_TEXT_GAMMA_SHADER "hwui.text_gamma_correction"
// Gamma (>= 1.0, <= 10.0)
-#define PROPERTY_TEXT_GAMMA "ro.text_gamma"
-#define PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD "ro.text_gamma.black_threshold"
-#define PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD "ro.text_gamma.white_threshold"
+#define PROPERTY_TEXT_GAMMA "hwui.text_gamma"
+// Luminance threshold below which black gamma correction is applied. Range: [0..255]
+#define PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD "hwui.text_gamma.black_threshold"
+// Lumincance threshold above which white gamma correction is applied. Range: [0..255]
+#define PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD "hwui.text_gamma.white_threshold"
// Converts a number of mega-bytes into bytes
#define MB(s) s * 1024 * 1024