graphics: allow re-saturation for any legacy dataspace
While our intention is to only re-saturate legacy sRGB, the
re-saturation is usually performed globally by the composer. To
avoid GPU fallback when, for example, video plays, allow the
re-saturation to be applied on any legacy dataspace.
This also removes the clamping after applying the re-saturation
matrix, allowing the output dataspace to be scRGB.
Bug: 78303195
Bug: 78025845
Test: manual
Change-Id: Ic221401894789fbaf6bad944b49006163238237c
diff --git a/graphics/composer/2.2/IComposerClient.hal b/graphics/composer/2.2/IComposerClient.hal
index b7ba6a6..a6665a1 100644
--- a/graphics/composer/2.2/IComposerClient.hal
+++ b/graphics/composer/2.2/IComposerClient.hal
@@ -383,9 +383,8 @@
* By default, layer dataspaces are mapped to the current color mode
* colorimetrically with a few exceptions.
*
- * When the layer dataspace is a legacy sRGB dataspace
- * (Dataspace::SRGB_LINEAR, Dataspace::SRGB, or Dataspace::UNKNOWN when
- * treated as such) and the display render intent is
+ * When the layer dataspace is a legacy dataspace (see
+ * common@1.1::Dataspace) and the display render intent is
* RenderIntent::ENHANCE, the pixel values can go through an
* implementation-defined saturation transform before being mapped to the
* current color mode colorimetrically.
@@ -402,7 +401,7 @@
* this:
*
* (in GLSL)
- * linearSrgb = clamp(saturationMatrix * linearSrgb, 0.0, 1.0);
+ * linearSrgb = saturationMatrix * linearSrgb;
*
* @param dataspace must be Dataspace::SRGB_LINEAR.
* @return error is NONE upon success. Otherwise,