OSDN Git Service

Modify color inversion matrix to swap Red and Blue colors
authorMauro Rossi <issor.oruam@gmail.com>
Thu, 9 Aug 2018 23:12:22 +0000 (01:12 +0200)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 20 Aug 2018 09:04:45 +0000 (17:04 +0800)
Instead of color inversion it will produce Red and Blue colors swap,
in order to correct displayed colors for R4xx and other old drivers
still based on KMS API

services/accessibility/java/com/android/server/accessibility/DisplayAdjustmentUtils.java

index c81a876..f97d767 100644 (file)
@@ -50,10 +50,10 @@ class DisplayAdjustmentUtils {
      * for full implementation details.
      */
     private static final float[] MATRIX_INVERT_COLOR = new float[] {
-        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
+       0.0f, 0.0f, 1.0f, 0,
+       0.0f, 1.0f, 0.0f, 0,
+       1.0f, 0.0f, 0.0f, 0,
+          0,    0,    0, 1
     };
 
     public static void applyDaltonizerSetting(Context context, int userId) {