[RenderEngine] Refactor the generation of EOTF, OOTF and OETF.
Previously the generation of EOTF, OOTF and OETF are in fragment shader
generation function, this patch refactors them out as their own functions.
BUG: 73825729
Test: build, flash
Change-Id: I4701c04252fb35dfe1676570b775a94108610b9f
diff --git a/services/surfaceflinger/RenderEngine/ProgramCache.h b/services/surfaceflinger/RenderEngine/ProgramCache.h
index f67e132..d18163a 100644
--- a/services/surfaceflinger/RenderEngine/ProgramCache.h
+++ b/services/surfaceflinger/RenderEngine/ProgramCache.h
@@ -28,6 +28,7 @@
namespace android {
class Description;
+class Formatter;
class Program;
class String8;
@@ -132,6 +133,12 @@
void primeCache();
// compute a cache Key from a Description
static Key computeKey(const Description& description);
+ // Generate EOTF based from Key.
+ static void generateEOTF(Formatter& fs, const Key& needs);
+ // Generate OOTF based from Key.
+ static void generateOOTF(Formatter& fs, const Key& needs);
+ // Generate OETF based from Key.
+ static void generateOETF(Formatter& fs, const Key& needs);
// generates a program from the Key
static Program* generateProgram(const Key& needs);
// generates the vertex shader from the Key