Dim correctly in screenshots on some devices
Some devices are configured to dim in gamma space for non-colorimetric
rendering intents. This configuration is a per-frame configuration on
HWC, but that doesn't work for screenshots.
Bug: 293560925
Test: HDR playback in youtube and rotate
Change-Id: I3110de534d6ef1ad16f9f94d30874bca6f8838c9
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 8ff11e2..81c3f2f 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -317,6 +317,11 @@
// on this behavior to increase contrast for some media sources.
bool mTreat170mAsSrgb = false;
+ // If true, then screenshots with an enhanced render intent will dim in gamma space.
+ // The purpose is to ensure that screenshots appear correct during system animations for devices
+ // that require that dimming must occur in gamma space.
+ bool mDimInGammaSpaceForEnhancedScreenshots = false;
+
// Allows to ignore physical orientation provided through hwc API in favour of
// 'ro.surface_flinger.primary_display_orientation'.
// TODO(b/246793311): Clean up a temporary property