hwc2: Add support for HDR and HWC tonemapping

- Identify HDR layer in HWC, and add support to handle
  tonemap requests from  SDM
- Include hwc tonemapper which tonemaps layers using the
  gpu tonemapper
- Add hint in BufferAllocator to specify gfx client

Change-Id: I45a2182fa96e366600d81cdb4cb08bceff3bfcb8
Crs-fixed: 2036626
diff --git a/sdm/libs/hwc2/Android.mk b/sdm/libs/hwc2/Android.mk
index 64f930e..219c19e 100644
--- a/sdm/libs/hwc2/Android.mk
+++ b/sdm/libs/hwc2/Android.mk
@@ -24,7 +24,8 @@
 
 LOCAL_SHARED_LIBRARIES        := libsdmcore libqservice libbinder libhardware libhardware_legacy \
                                  libutils libcutils libsync libqdutils libqdMetaData libdl \
-                                 libpowermanager libsdmutils libc++ liblog libgrallocutils
+                                 libpowermanager libsdmutils libc++ liblog libgrallocutils \
+                                 libui libgpu_tonemapper
 
 ifneq ($(TARGET_USES_GRALLOC1), true)
     LOCAL_SHARED_LIBRARIES += libmemalloc
@@ -41,7 +42,8 @@
                                  hwc_layers.cpp \
                                  hwc_callbacks.cpp \
                                  ../hwc/cpuhint.cpp \
-                                 ../hwc/hwc_socket_handler.cpp
+                                 ../hwc/hwc_socket_handler.cpp \
+                                 hwc_tonemapper.cpp
 
 ifneq ($(TARGET_USES_GRALLOC1), true)
     LOCAL_SRC_FILES += ../hwc/hwc_buffer_allocator.cpp