SurfaceFlinger: Fix check for ignoring a new color transform
Output::setColorTransform() was trying to detect whether the input value was actually different from the current value before accepting it and marking the display as dirty. The update check was based on how the code originally worked -- distilling the transform down to a HAL_COLOR_TRANSFORM_XXX constant based on whether the matrix was identity or not. The code was since changed to actually store the actual value of the matrix, for use when client composition is used, but that meant that if the current value was a non-identity matrix, and a DIFFERENT non-identity matrix was set, the new setting was incorrectly rejected. The fix is just to do an equality check on the entire matrix rather than on the distilled value. And since this function is covered by a unit test, I made additions to the test to make sure that the failure would be detected should the logic change again. Bug: 131571679 Test: atest libcompositionengine_test Test: Repro steps from bug Change-Id: I73291ab1f3fbf987353ed59439baf2b4ad5fab33
Loading
Please register or sign in to comment