SF: DisplayCommand.colorTransform is just a matrix
Remove the hint from DisplayCommand.colorTransform as currently
we only use ColorTransform::IDENTITY and ColorTransform::ARBITRARY_MATRIX,
which both can be expressed using a matrix.
Bug: 208879711
Test: VTS
Change-Id: I1c335647aabb7f89c2c89e54abfc839d10a659fb
diff --git a/services/surfaceflinger/tests/unittests/CompositionTest.cpp b/services/surfaceflinger/tests/unittests/CompositionTest.cpp
index 7174f58..89a517f 100644
--- a/services/surfaceflinger/tests/unittests/CompositionTest.cpp
+++ b/services/surfaceflinger/tests/unittests/CompositionTest.cpp
@@ -87,6 +87,11 @@
constexpr int DEFAULT_SIDEBAND_STREAM = 51;
+MATCHER(IsIdentityMatrix, "") {
+ constexpr auto kIdentity = mat4();
+ return (mat4(arg) == kIdentity);
+}
+
class CompositionTest : public testing::Test {
public:
CompositionTest() {
@@ -325,9 +330,7 @@
template <typename Case>
static void setupCommonCompositionCallExpectations(CompositionTest* test) {
- EXPECT_CALL(*test->mComposer,
- setColorTransform(HWC_DISPLAY, _, Hwc2::ColorTransform::IDENTITY))
- .Times(1);
+ EXPECT_CALL(*test->mComposer, setColorTransform(HWC_DISPLAY, IsIdentityMatrix())).Times(1);
EXPECT_CALL(*test->mComposer, getDisplayRequests(HWC_DISPLAY, _, _, _)).Times(1);
EXPECT_CALL(*test->mComposer, acceptDisplayChanges(HWC_DISPLAY)).Times(1);
EXPECT_CALL(*test->mComposer, presentDisplay(HWC_DISPLAY, _)).Times(1);
@@ -448,9 +451,7 @@
template <typename Case>
static void setupCommonCompositionCallExpectations(CompositionTest* test) {
// TODO: This seems like an unnecessary call if display is powered off.
- EXPECT_CALL(*test->mComposer,
- setColorTransform(HWC_DISPLAY, _, Hwc2::ColorTransform::IDENTITY))
- .Times(1);
+ EXPECT_CALL(*test->mComposer, setColorTransform(HWC_DISPLAY, IsIdentityMatrix())).Times(1);
// TODO: This seems like an unnecessary call if display is powered off.
Case::CompositionType::setupHwcSetCallExpectations(test);