Loading services/core/java/com/android/server/display/NightDisplayService.java +5 −9 Original line number Diff line number Diff line Loading @@ -111,11 +111,7 @@ public final class NightDisplayService extends SystemService private float[] mMatrixNight = new float[16]; /** * These coefficients were generated by an LLS quadratic regression fitted to the * overdetermined system based on experimental readings (and subsequent conversion from xy * chromaticity coordinates to gamma-corrected RGB values): { (temperature, R, G, B) } -> * { (7304, 1.0, 1.0, 1.0), (4082, 1.0, 0.857, 0.719), (2850, 1.0, .754, .516), * (2596, 1.0, 0.722, 0.454) }. The 3x3 matrix is formatted like so: * The 3x3 color transformation matrix is formatted like so: * <table> * <tr><td>R: a coefficient</td><td>G: a coefficient</td><td>B: a coefficient</td></tr> * <tr><td>R: b coefficient</td><td>G: b coefficient</td><td>B: b coefficient</td></tr> Loading @@ -123,9 +119,9 @@ public final class NightDisplayService extends SystemService * </table> */ private static final float[] mColorTempCoefficients = new float[] { 0.0f, -0.00000000962353339f, -0.0000000189359041f, 0.0f, 0.000153045476f, 0.000302412211f, 1.0f, 0.390782778f, -0.198650895f 0.0f, -0.0000000871377221f, -0.0000000753960646f, 0.0f, 0.000750142586f, .000725567598f, 1.0f, -.830130222f, -1.15546312f }; private int mCurrentUser = UserHandle.USER_NULL; Loading Loading @@ -410,7 +406,7 @@ public final class NightDisplayService extends SystemService return; } Matrix.setIdentityM(mMatrixNight, 0); Matrix.setIdentityM(outTemp, 0); final float squareTemperature = colorTemperature * colorTemperature; final float red = squareTemperature * mColorTempCoefficients[0] Loading Loading
services/core/java/com/android/server/display/NightDisplayService.java +5 −9 Original line number Diff line number Diff line Loading @@ -111,11 +111,7 @@ public final class NightDisplayService extends SystemService private float[] mMatrixNight = new float[16]; /** * These coefficients were generated by an LLS quadratic regression fitted to the * overdetermined system based on experimental readings (and subsequent conversion from xy * chromaticity coordinates to gamma-corrected RGB values): { (temperature, R, G, B) } -> * { (7304, 1.0, 1.0, 1.0), (4082, 1.0, 0.857, 0.719), (2850, 1.0, .754, .516), * (2596, 1.0, 0.722, 0.454) }. The 3x3 matrix is formatted like so: * The 3x3 color transformation matrix is formatted like so: * <table> * <tr><td>R: a coefficient</td><td>G: a coefficient</td><td>B: a coefficient</td></tr> * <tr><td>R: b coefficient</td><td>G: b coefficient</td><td>B: b coefficient</td></tr> Loading @@ -123,9 +119,9 @@ public final class NightDisplayService extends SystemService * </table> */ private static final float[] mColorTempCoefficients = new float[] { 0.0f, -0.00000000962353339f, -0.0000000189359041f, 0.0f, 0.000153045476f, 0.000302412211f, 1.0f, 0.390782778f, -0.198650895f 0.0f, -0.0000000871377221f, -0.0000000753960646f, 0.0f, 0.000750142586f, .000725567598f, 1.0f, -.830130222f, -1.15546312f }; private int mCurrentUser = UserHandle.USER_NULL; Loading Loading @@ -410,7 +406,7 @@ public final class NightDisplayService extends SystemService return; } Matrix.setIdentityM(mMatrixNight, 0); Matrix.setIdentityM(outTemp, 0); final float squareTemperature = colorTemperature * colorTemperature; final float red = squareTemperature * mColorTempCoefficients[0] Loading