SF: Decouple MessageQueue
Define an ICompositor interface against which MessageQueue (which ought
to be an implementation detail of Scheduler) is implemented. Change the
equivocal invalidate/refresh nomenclature to commit/composite. Schedule
sampling only after composite.
Bug: 185535769
Test: libsurfaceflinger_unittest
Change-Id: I0c18f312459bae48531449f24f7b53c104fc5812
diff --git a/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp b/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp
index 84fa1e2..6c3b2fd 100644
--- a/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp
+++ b/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp
@@ -176,7 +176,7 @@
* Test cases
*/
TEST_P(SetFrameRateTest, SetAndGet) {
- EXPECT_CALL(*mMessageQueue, invalidate()).Times(1);
+ EXPECT_CALL(*mMessageQueue, scheduleCommit()).Times(1);
const auto& layerFactory = GetParam();
@@ -187,7 +187,7 @@
}
TEST_P(SetFrameRateTest, SetAndGetParent) {
- EXPECT_CALL(*mMessageQueue, invalidate()).Times(1);
+ EXPECT_CALL(*mMessageQueue, scheduleCommit()).Times(1);
const auto& layerFactory = GetParam();
@@ -212,7 +212,7 @@
}
TEST_P(SetFrameRateTest, SetAndGetParentAllVote) {
- EXPECT_CALL(*mMessageQueue, invalidate()).Times(1);
+ EXPECT_CALL(*mMessageQueue, scheduleCommit()).Times(1);
const auto& layerFactory = GetParam();
@@ -251,7 +251,7 @@
}
TEST_P(SetFrameRateTest, SetAndGetChild) {
- EXPECT_CALL(*mMessageQueue, invalidate()).Times(1);
+ EXPECT_CALL(*mMessageQueue, scheduleCommit()).Times(1);
const auto& layerFactory = GetParam();
@@ -276,7 +276,7 @@
}
TEST_P(SetFrameRateTest, SetAndGetChildAllVote) {
- EXPECT_CALL(*mMessageQueue, invalidate()).Times(1);
+ EXPECT_CALL(*mMessageQueue, scheduleCommit()).Times(1);
const auto& layerFactory = GetParam();
@@ -315,7 +315,7 @@
}
TEST_P(SetFrameRateTest, SetAndGetChildAddAfterVote) {
- EXPECT_CALL(*mMessageQueue, invalidate()).Times(1);
+ EXPECT_CALL(*mMessageQueue, scheduleCommit()).Times(1);
const auto& layerFactory = GetParam();
@@ -345,7 +345,7 @@
}
TEST_P(SetFrameRateTest, SetAndGetChildRemoveAfterVote) {
- EXPECT_CALL(*mMessageQueue, invalidate()).Times(1);
+ EXPECT_CALL(*mMessageQueue, scheduleCommit()).Times(1);
const auto& layerFactory = GetParam();
@@ -376,7 +376,7 @@
}
TEST_P(SetFrameRateTest, SetAndGetParentNotInTree) {
- EXPECT_CALL(*mMessageQueue, invalidate()).Times(1);
+ EXPECT_CALL(*mMessageQueue, scheduleCommit()).Times(1);
const auto& layerFactory = GetParam();
@@ -475,7 +475,7 @@
}
TEST_P(SetFrameRateTest, addChildForParentWithTreeVote) {
- EXPECT_CALL(*mMessageQueue, invalidate()).Times(1);
+ EXPECT_CALL(*mMessageQueue, scheduleCommit()).Times(1);
const auto& layerFactory = GetParam();