diff options
author | Alan Viverette <alanv@google.com> | 2015-04-29 16:38:42 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-29 16:38:43 +0000 |
commit | 7a6caae616fedab08aa3bcb1e37edf5f1e756dda (patch) | |
tree | c78b8a4edae9a93d78e49aa68131030fda71bdb6 | |
parent | eea5a9e0de5825bf3629ad52a51a0dcf5f064fe5 (diff) | |
parent | 6437518061fc8718590e0272ed17ea64710d2299 (diff) | |
download | frameworks_base-7a6caae616fedab08aa3bcb1e37edf5f1e756dda.zip frameworks_base-7a6caae616fedab08aa3bcb1e37edf5f1e756dda.tar.gz frameworks_base-7a6caae616fedab08aa3bcb1e37edf5f1e756dda.tar.bz2 |
Merge "Adjust display inversion matrix to account for luminance" into mnc-dev
-rw-r--r-- | services/accessibility/java/com/android/server/accessibility/DisplayAdjustmentUtils.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/services/accessibility/java/com/android/server/accessibility/DisplayAdjustmentUtils.java b/services/accessibility/java/com/android/server/accessibility/DisplayAdjustmentUtils.java index 38827d0..d0b5898 100644 --- a/services/accessibility/java/com/android/server/accessibility/DisplayAdjustmentUtils.java +++ b/services/accessibility/java/com/android/server/accessibility/DisplayAdjustmentUtils.java @@ -41,12 +41,18 @@ class DisplayAdjustmentUtils { 0, 0, 0, 1 }; - /** Matrix and offset used for value-only display inversion. */ + /** + * Matrix and offset used for luminance inversion. Represents a transform + * from RGB to YIQ color space, rotation around the Y axis by 180 degrees, + * transform back to RGB color space, and subtraction from 1. The last row + * represents a non-multiplied addition, see surfaceflinger's ProgramCache + * for full implementation details. + */ private static final float[] INVERSION_MATRIX_VALUE_ONLY = new float[] { - 0, -.5f, -.5f, 0, - -.5f, 0, -.5f, 0, - -.5f, -.5f, 0, 0, - 1, 1, 1, 1 + 0.402f, -0.598f, -0.599f, 0, + -1.174f, -0.174f, -1.175f, 0, + -0.228f, -0.228f, 0.772f, 0, + 1, 1, 1, 1 }; /** Default inversion mode for display color correction. */ |