[Native] Replace android_color_mode usage with ColorMode.
To ease the pain when we add color mode v1.1, we replace all current
android_color_mode usage in framework native with ColorMode directly from HAL.
BUG: 73824924
Test: Build & flash
Change-Id: I4436fc225c7807506825c7148bc794cb99f278dc
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 33786e8..104adef 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -394,9 +394,9 @@
Vector<DisplayInfo>* configs);
virtual int getActiveConfig(const sp<IBinder>& display);
virtual status_t getDisplayColorModes(const sp<IBinder>& display,
- Vector<android_color_mode_t>* configs);
- virtual android_color_mode_t getActiveColorMode(const sp<IBinder>& display);
- virtual status_t setActiveColorMode(const sp<IBinder>& display, android_color_mode_t colorMode);
+ Vector<ColorMode>* configs);
+ virtual ColorMode getActiveColorMode(const sp<IBinder>& display);
+ virtual status_t setActiveColorMode(const sp<IBinder>& display, ColorMode colorMode);
virtual void setPowerMode(const sp<IBinder>& display, int mode);
virtual status_t setActiveConfig(const sp<IBinder>& display, int id);
virtual status_t clearAnimationFrameStats();
@@ -446,7 +446,7 @@
bool stateLockHeld);
// Called on the main thread in response to setActiveColorMode()
- void setActiveColorModeInternal(const sp<DisplayDevice>& hw, android_color_mode_t colorMode);
+ void setActiveColorModeInternal(const sp<DisplayDevice>& hw, ColorMode colorMode);
// Returns whether the transaction actually modified any state
bool handleMessageTransaction();
@@ -619,7 +619,7 @@
// Given a dataSpace, returns the appropriate color_mode to use
// to display that dataSpace.
- android_color_mode pickColorMode(android_dataspace dataSpace) const;
+ ColorMode pickColorMode(android_dataspace dataSpace) const;
android_dataspace bestTargetDataSpace(android_dataspace a, android_dataspace b,
bool hasHdr) const;