SF: pass Color as float to HWC
In HWC3 Color is represented as a float [0.0 - 1.0] to be consistent
across the stack. SF passes the color as float and it gets translated
back to uint8_t for HWC2.
Bug: 207139550
Test: atest SurfaceFlinger_test
Change-Id: I83867eed70bd3baa3292c9cc099d891ba9cc6183
diff --git a/services/surfaceflinger/DisplayHardware/HWC2.h b/services/surfaceflinger/DisplayHardware/HWC2.h
index df4e4b8..d29e9e5 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2.h
+++ b/services/surfaceflinger/DisplayHardware/HWC2.h
@@ -37,6 +37,7 @@
#include "ComposerHal.h"
#include "Hal.h"
+#include <aidl/android/hardware/graphics/composer3/Color.h>
#include <aidl/android/hardware/graphics/composer3/Composition.h>
#include <aidl/android/hardware/graphics/composer3/DisplayCapability.h>
@@ -279,7 +280,8 @@
const android::Region& damage) = 0;
[[clang::warn_unused_result]] virtual hal::Error setBlendMode(hal::BlendMode mode) = 0;
- [[clang::warn_unused_result]] virtual hal::Error setColor(hal::Color color) = 0;
+ [[clang::warn_unused_result]] virtual hal::Error setColor(
+ aidl::android::hardware::graphics::composer3::Color color) = 0;
[[clang::warn_unused_result]] virtual hal::Error setCompositionType(
aidl::android::hardware::graphics::composer3::Composition type) = 0;
[[clang::warn_unused_result]] virtual hal::Error setDataspace(hal::Dataspace dataspace) = 0;
@@ -330,7 +332,7 @@
hal::Error setSurfaceDamage(const android::Region& damage) override;
hal::Error setBlendMode(hal::BlendMode mode) override;
- hal::Error setColor(hal::Color color) override;
+ hal::Error setColor(aidl::android::hardware::graphics::composer3::Color color) override;
hal::Error setCompositionType(
aidl::android::hardware::graphics::composer3::Composition type) override;
hal::Error setDataspace(hal::Dataspace dataspace) override;