Skip to content
Snippets Groups Projects
Commit a92d6d14 authored by Sally Qi's avatar Sally Qi
Browse files

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.
- This fix also contains commit I094836e460e0d64b28492061128cff11f22944d9

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

Change-Id: I281687a010bbf5bff555f6fa893002c2a9b324d1
Merged-In: I281687a010bbf5bff555f6fa893002c2a9b324d1
parent 32829c7a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment