-
Christopher Cameron authored
When we draw IOSurfaces using CoreAnimation, there is a power "discount" if the IOSurface has the exact same byte-for-byte ICC profile as the monitor it is displayed on. The browser retrieves these ICC profiles via ScreenMac, and the renderer process is sent them via ScreenInfo, but the GPU process does not get them. As a consequence, color spaces assigned to GLImages via SetColorSpaceMetadataCHROMIUM do not match monitors' ICC profiles, and power suffers. Solve this by creating a DisplayICCProfiles class to provide a map from ColorSpace objects to the ICC profile data that created them. Instantiate this in the GPU process for use with by GLImageIOSurface::SetColorSpace. As a follow on to this patch (but not for merge): - Change the zero copy path to use SetColorSpaceMetadataCHROMIUM - Remove ICCProfile::FromCacheMac - Remove sending ICCProfiles via IPC to the renderer (they are currently only used for this purpose) - Make SetColorSpaceMetadataCHROMIUM be the only path that will produce this byte-for-byte ICC profile match (it will be the only one that matters) Bug: 869570 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: Ifb0981a97ccbb249b1d0dab1c0aa57e48931ebdb Reviewed-on: https://chromium-review.googlesource.com/1157288 Commit-Queue: ccameron <ccameron@chromium.org> Reviewed-by:
Kenneth Russell <kbr@chromium.org> Reviewed-by:
Sunny Sachanandani <sunnyps@chromium.org> Cr-Commit-Position: refs/heads/master@{#579946}
8768493d