Refactor `isHdrDataspace` function.

- Rename it to `getHdrRenderType` and return a ternary enum.
- return the hdr type that we want to treat based on the dataspace,
  format and hdr/sdr ratio.
- pixelformat is optional, in case no source buffer but there is a
  source color.
- hdr/sdr ratio is 1.0f by default, render rengine doesn't take care
  this param.
- The ternary enum has 3 types: just SDR; generic hdr, namely those we
  need to tonemap; display hdr, namely those self-promoting to HDR by
  using extended brightness API.

Bug: 261485283
Test: HdrRenderTypeUtils_test, TextureViewTest#testSDRFromSurfaceViewAndTextureView, OutputLayerUpdateCompositionStateTest

Change-Id: I281687a010bbf5bff555f6fa893002c2a9b324d1
diff --git a/libs/ui/tests/Android.bp b/libs/ui/tests/Android.bp
index 831b64d..8ce017d 100644
--- a/libs/ui/tests/Android.bp
+++ b/libs/ui/tests/Android.bp
@@ -164,9 +164,9 @@
 }
 
 cc_test {
-    name: "DataspaceUtils_test",
+    name: "HdrRenderTypeUtils_test",
     shared_libs: ["libui"],
-    srcs: ["DataspaceUtils_test.cpp"],
+    srcs: ["HdrRenderTypeUtils_test.cpp"],
     cflags: [
         "-Wall",
         "-Werror",