ui/display: don't clear ColorSpace after CTM/de/gamma configuration
Many moons ago, DisplayConfigurator::SetColorMatrix() / SetGammaCorrection() were only called once after parsing a hypothetical ICC file -- those days CrOS didn't manipulate the display's color characteristics, so we configured either / both, and cleared the ColorSpace to avoid overwriting those two DRM tables unnecessarily. Note that the matrix/de/gamma tables were loaded after every wake up. Time after that came Night Light and other color mgmt projects, and this code path started being used when coming out of sleep/hibernate etc, with the caveat that after applying their matrix/de/gamma tables, the cached colorspaces was/were still cleared and lost. The fix is then simple: since we need the |color_space| to stick around, this CL avoids clearing it. RunColorCorrectionClosureSync() is then superfluous and can be removed, making evident that searching for |display_id| in |cached_displays_| is only for verification purposes: Bug: b:159224397, 1091552 Change-Id: I553646217c1012221844242c96148b8526657217 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2342583Reviewed-by:Ahmed Fakhry <afakhry@chromium.org> Reviewed-by:
Daniel Nicoara <dnicoara@chromium.org> Commit-Queue: Miguel Casas <mcasas@chromium.org> Cr-Commit-Position: refs/heads/master@{#796442}
Showing
Please register or sign in to comment