Tonemap in RecordingCanvas

Intecepts bitmap calls to tonemap whenever the source is HDR (PQ/HLG)
and the destination is SDR.

Also, fix the following bugs discovered as part of testing:
1. Don't implicitly cast to booleans when extracting transfer functions
   from a dataspace in hwui's tonemapper.
2. Fix some typos in defining the HLG/PQ transfer functions.

Bug: 261088450
Test: New ColorBitmapActivity in HwAccelerationTest
Change-Id: I9d9d68fc4f57b999b3c6d4156bef281b4409f37e
7 files changed