Add libtonemap library
libtonemap is a vendor-available static library which provides a single
point where the definitions of tone mapping operations can be shared.
This faciliates sharing tone mapping operations between system libraries
and vendor libraries without making invasive changes to the framework.
The canonical use-case for this library is matching the tone-mapping
curves between DPU composition and GPU composition for the display.
Although not done in this patch, this library may be linked into
libhwui, for propagating the tone mapping operation into TextureView.
The initial design for this library is to expose a Tonemapper class,
which can return:
1. A shader string describing the tonemapper operation, which may be
inserted into any other shader string.
2. A list of shader uniforms for binding to the final shader
A later patch will allow for computing the tone mapping curve on the
CPU, which is useful for unit testing, and optionally for generating a
LUT without firing up the GPU.
Bug: 200310159
Ignore-AOSP-First: new internal-only lib
Test: libtonemap_test
Change-Id: I7f1353e0f456ec5f371e31754b2965c9b44aa125
diff --git a/services/surfaceflinger/CompositionEngine/Android.bp b/services/surfaceflinger/CompositionEngine/Android.bp
index 83b4a25..aefc014 100644
--- a/services/surfaceflinger/CompositionEngine/Android.bp
+++ b/services/surfaceflinger/CompositionEngine/Android.bp
@@ -38,6 +38,7 @@
static_libs: [
"libmath",
"librenderengine",
+ "libtonemap",
"libtrace_proto",
"libaidlcommonsupport",
],