summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Brian Lindahl <blindahl@google.com> 2024-12-06 08:25:05 -0700
committer Brian Lindahl <blindahl@google.com> 2024-12-06 10:33:17 -0700
commite8334907786ff4ac63d3ba9cccc12c4dbd8f501e (patch)
treedd0f7019b569d27cb418ecdd6fa068e6b86b7684
parent0b577d98c9e1758a24c9d9f7cf13e3d637667fdd (diff)
Rename of ActivePictureUpdater to ActivePictureTracker
Bug: 337330263 Test: build Test: atest ActivePictureTrackerTest Flag: com.android.graphics.libgui.flags.apply_picture_profiles Change-Id: I2ba2c707034312782d7bdd73d55673b740d651cd
-rw-r--r--METADATA2
-rw-r--r--services/surfaceflinger/ActivePictureTracker.cpp (renamed from services/surfaceflinger/ActivePictureUpdater.cpp)8
-rw-r--r--services/surfaceflinger/ActivePictureTracker.h (renamed from services/surfaceflinger/ActivePictureUpdater.h)2
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp8
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h4
-rw-r--r--services/surfaceflinger/tests/unittests/ActivePictureTrackerTest.cpp (renamed from services/surfaceflinger/tests/unittests/ActivePictureUpdaterTest.cpp)148
6 files changed, 86 insertions, 86 deletions
diff --git a/METADATA b/METADATA
index d97975ca3b..86892cda0b 100644
--- a/METADATA
+++ b/METADATA
@@ -1,3 +1,3 @@
-third_party {
+ third_party {
license_type: NOTICE
}
diff --git a/services/surfaceflinger/ActivePictureUpdater.cpp b/services/surfaceflinger/ActivePictureTracker.cpp
index 210e948a49..031940841e 100644
--- a/services/surfaceflinger/ActivePictureUpdater.cpp
+++ b/services/surfaceflinger/ActivePictureTracker.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "ActivePictureUpdater.h"
+#include "ActivePictureTracker.h"
#include <algorithm>
@@ -23,7 +23,7 @@
namespace android {
-void ActivePictureUpdater::onLayerComposed(const Layer& layer, const LayerFE& layerFE,
+void ActivePictureTracker::onLayerComposed(const Layer& layer, const LayerFE& layerFE,
const CompositionResult& result) {
if (result.wasPictureProfileCommitted) {
gui::ActivePicture picture;
@@ -39,7 +39,7 @@ void ActivePictureUpdater::onLayerComposed(const Layer& layer, const LayerFE& la
}
}
-bool ActivePictureUpdater::updateAndHasChanged() {
+bool ActivePictureTracker::updateAndHasChanged() {
bool hasChanged = true;
if (mNewActivePictures.size() == mOldActivePictures.size()) {
auto compare = [](const gui::ActivePicture& lhs, const gui::ActivePicture& rhs) -> int {
@@ -59,7 +59,7 @@ bool ActivePictureUpdater::updateAndHasChanged() {
return hasChanged;
}
-const std::vector<gui::ActivePicture>& ActivePictureUpdater::getActivePictures() const {
+const std::vector<gui::ActivePicture>& ActivePictureTracker::getActivePictures() const {
return mOldActivePictures;
}
diff --git a/services/surfaceflinger/ActivePictureUpdater.h b/services/surfaceflinger/ActivePictureTracker.h
index 20779bb0ff..95a698ba7f 100644
--- a/services/surfaceflinger/ActivePictureUpdater.h
+++ b/services/surfaceflinger/ActivePictureTracker.h
@@ -27,7 +27,7 @@ class LayerFE;
struct CompositionResult;
// Keeps track of active pictures - layers that are undergoing picture processing.
-class ActivePictureUpdater {
+class ActivePictureTracker {
public:
// Called for each visible layer when SurfaceFlinger finishes composing.
void onLayerComposed(const Layer& layer, const LayerFE& layerFE,
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 59b1917740..1498fffea4 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -126,7 +126,7 @@
#include <gui/SchedulingPolicy.h>
#include <gui/SyncScreenCaptureListener.h>
#include <ui/DisplayIdentification.h>
-#include "ActivePictureUpdater.h"
+#include "ActivePictureTracker.h"
#include "BackgroundExecutor.h"
#include "Client.h"
#include "ClientCache.h"
@@ -2911,7 +2911,7 @@ CompositeResultsPerDisplay SurfaceFlinger::composite(
layer->setWasClientComposed(compositionResult.lastClientCompositionFence);
}
if (com_android_graphics_libgui_flags_apply_picture_profiles()) {
- mActivePictureUpdater.onLayerComposed(*layer, *layerFE, compositionResult);
+ mActivePictureTracker.onLayerComposed(*layer, *layerFE, compositionResult);
}
}
@@ -3314,10 +3314,10 @@ void SurfaceFlinger::onCompositionPresented(PhysicalDisplayId pacesetterId,
if (com_android_graphics_libgui_flags_apply_picture_profiles()) {
// Track, update and notify changes to active pictures - layers that are undergoing picture
// processing
- if (mActivePictureUpdater.updateAndHasChanged() || haveNewActivePictureListener) {
+ if (mActivePictureTracker.updateAndHasChanged() || haveNewActivePictureListener) {
if (activePictureListener) {
activePictureListener->onActivePicturesChanged(
- mActivePictureUpdater.getActivePictures());
+ mActivePictureTracker.getActivePictures());
}
}
}
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 1e2c08747b..b16ea082a9 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -69,7 +69,7 @@
#include <ui/FenceResult.h>
#include <common/FlagManager.h>
-#include "ActivePictureUpdater.h"
+#include "ActivePictureTracker.h"
#include "BackgroundExecutor.h"
#include "Display/DisplayModeController.h"
#include "Display/PhysicalDisplay.h"
@@ -1404,7 +1404,7 @@ private:
sp<gui::IActivePictureListener> mActivePictureListener GUARDED_BY(mStateLock);
bool mHaveNewActivePictureListener GUARDED_BY(mStateLock);
- ActivePictureUpdater mActivePictureUpdater GUARDED_BY(kMainThreadContext);
+ ActivePictureTracker mActivePictureTracker GUARDED_BY(kMainThreadContext);
std::atomic<ui::Transform::RotationFlags> mActiveDisplayTransformHint;
diff --git a/services/surfaceflinger/tests/unittests/ActivePictureUpdaterTest.cpp b/services/surfaceflinger/tests/unittests/ActivePictureTrackerTest.cpp
index b926d2f4da..ff9a4562bf 100644
--- a/services/surfaceflinger/tests/unittests/ActivePictureUpdaterTest.cpp
+++ b/services/surfaceflinger/tests/unittests/ActivePictureTrackerTest.cpp
@@ -24,7 +24,7 @@
#include <mock/MockLayer.h>
#include <renderengine/mock/RenderEngine.h>
-#include "ActivePictureUpdater.h"
+#include "ActivePictureTracker.h"
#include "LayerFE.h"
#include "TestableSurfaceFlinger.h"
@@ -48,7 +48,7 @@ public:
LayerSnapshot& snapshot;
};
-class ActivePictureUpdaterTest : public testing::Test {
+class ActivePictureTrackerTest : public testing::Test {
protected:
SurfaceFlinger* flinger() {
if (!mFlingerSetup) {
@@ -84,113 +84,113 @@ void PrintTo(const ActivePicture& activePicture, std::ostream* os) {
*os << activePicture.toString();
}
-TEST_F(ActivePictureUpdaterTest, notCalledWithNoProfile) {
+TEST_F(ActivePictureTrackerTest, notCalledWithNoProfile) {
sp<NiceMock<MockLayer>> layer = sp<NiceMock<MockLayer>>::make(flinger(), 100);
TestableLayerFE layerFE;
EXPECT_CALL(*layer, getOwnerUid()).WillRepeatedly(Return(uid_t(10)));
- ActivePictureUpdater updater;
+ ActivePictureTracker tracker;
{
layerFE.snapshot.pictureProfileHandle = PictureProfileHandle::NONE;
- updater.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
+ tracker.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
- ASSERT_FALSE(updater.updateAndHasChanged());
+ ASSERT_FALSE(tracker.updateAndHasChanged());
}
}
-TEST_F(ActivePictureUpdaterTest, calledWhenLayerStartsUsingProfile) {
+TEST_F(ActivePictureTrackerTest, calledWhenLayerStartsUsingProfile) {
sp<NiceMock<MockLayer>> layer = sp<NiceMock<MockLayer>>::make(flinger(), 100);
TestableLayerFE layerFE;
EXPECT_CALL(*layer, getOwnerUid()).WillRepeatedly(Return(uid_t(10)));
- ActivePictureUpdater updater;
+ ActivePictureTracker tracker;
{
layerFE.snapshot.pictureProfileHandle = PictureProfileHandle::NONE;
- updater.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
+ tracker.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
- ASSERT_FALSE(updater.updateAndHasChanged());
+ ASSERT_FALSE(tracker.updateAndHasChanged());
}
{
layerFE.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE.onPictureProfileCommitted();
- updater.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
+ tracker.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(), UnorderedElementsAre({{100, 10, 1}}));
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(), UnorderedElementsAre({{100, 10, 1}}));
}
}
-TEST_F(ActivePictureUpdaterTest, notCalledWhenLayerContinuesUsingProfile) {
+TEST_F(ActivePictureTrackerTest, notCalledWhenLayerContinuesUsingProfile) {
sp<NiceMock<MockLayer>> layer = sp<NiceMock<MockLayer>>::make(flinger(), 100);
TestableLayerFE layerFE;
EXPECT_CALL(*layer, getOwnerUid()).WillRepeatedly(Return(uid_t(10)));
- ActivePictureUpdater updater;
+ ActivePictureTracker tracker;
{
layerFE.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE.onPictureProfileCommitted();
- updater.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
+ tracker.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(), UnorderedElementsAre({{100, 10, 1}}));
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(), UnorderedElementsAre({{100, 10, 1}}));
}
{
layerFE.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE.onPictureProfileCommitted();
- updater.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
+ tracker.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
- ASSERT_FALSE(updater.updateAndHasChanged());
+ ASSERT_FALSE(tracker.updateAndHasChanged());
}
}
-TEST_F(ActivePictureUpdaterTest, calledWhenLayerStopsUsingProfile) {
+TEST_F(ActivePictureTrackerTest, calledWhenLayerStopsUsingProfile) {
sp<NiceMock<MockLayer>> layer = sp<NiceMock<MockLayer>>::make(flinger(), 100);
TestableLayerFE layerFE;
EXPECT_CALL(*layer, getOwnerUid()).WillRepeatedly(Return(uid_t(10)));
- ActivePictureUpdater updater;
+ ActivePictureTracker tracker;
{
layerFE.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE.onPictureProfileCommitted();
- updater.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
+ tracker.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(), UnorderedElementsAre({{100, 10, 1}}));
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(), UnorderedElementsAre({{100, 10, 1}}));
}
{
layerFE.snapshot.pictureProfileHandle = PictureProfileHandle::NONE;
- updater.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
+ tracker.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(), UnorderedElementsAre({}));
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(), UnorderedElementsAre({}));
}
}
-TEST_F(ActivePictureUpdaterTest, calledWhenLayerChangesProfile) {
+TEST_F(ActivePictureTrackerTest, calledWhenLayerChangesProfile) {
sp<NiceMock<MockLayer>> layer = sp<NiceMock<MockLayer>>::make(flinger(), 100);
TestableLayerFE layerFE;
EXPECT_CALL(*layer, getOwnerUid()).WillRepeatedly(Return(uid_t(10)));
- ActivePictureUpdater updater;
+ ActivePictureTracker tracker;
{
layerFE.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE.onPictureProfileCommitted();
- updater.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
+ tracker.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(), UnorderedElementsAre({{100, 10, 1}}));
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(), UnorderedElementsAre({{100, 10, 1}}));
}
{
layerFE.snapshot.pictureProfileHandle = PictureProfileHandle(2);
layerFE.onPictureProfileCommitted();
- updater.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
+ tracker.onLayerComposed(*layer, layerFE, layerFE.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(), UnorderedElementsAre({{100, 10, 2}}));
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(), UnorderedElementsAre({{100, 10, 2}}));
}
}
-TEST_F(ActivePictureUpdaterTest, notCalledWhenUncommittedLayerChangesProfile) {
+TEST_F(ActivePictureTrackerTest, notCalledWhenUncommittedLayerChangesProfile) {
sp<NiceMock<MockLayer>> layer1 = sp<NiceMock<MockLayer>>::make(flinger(), 100);
TestableLayerFE layerFE1;
EXPECT_CALL(*layer1, getOwnerUid()).WillRepeatedly(Return(uid_t(10)));
@@ -199,31 +199,31 @@ TEST_F(ActivePictureUpdaterTest, notCalledWhenUncommittedLayerChangesProfile) {
TestableLayerFE layerFE2;
EXPECT_CALL(*layer2, getOwnerUid()).WillRepeatedly(Return(uid_t(20)));
- ActivePictureUpdater updater;
+ ActivePictureTracker tracker;
{
layerFE1.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE1.onPictureProfileCommitted();
- updater.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
+ tracker.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
layerFE2.snapshot.pictureProfileHandle = PictureProfileHandle(1);
- updater.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
+ tracker.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(), UnorderedElementsAre({{100, 10, 1}}));
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(), UnorderedElementsAre({{100, 10, 1}}));
}
{
layerFE1.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE1.onPictureProfileCommitted();
- updater.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
+ tracker.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
layerFE2.snapshot.pictureProfileHandle = PictureProfileHandle(2);
- updater.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
+ tracker.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
- ASSERT_FALSE(updater.updateAndHasChanged());
+ ASSERT_FALSE(tracker.updateAndHasChanged());
}
}
-TEST_F(ActivePictureUpdaterTest, calledWhenDifferentLayerUsesSameProfile) {
+TEST_F(ActivePictureTrackerTest, calledWhenDifferentLayerUsesSameProfile) {
sp<NiceMock<MockLayer>> layer1 = sp<NiceMock<MockLayer>>::make(flinger(), 100);
TestableLayerFE layerFE1;
EXPECT_CALL(*layer1, getOwnerUid()).WillRepeatedly(Return(uid_t(10)));
@@ -232,36 +232,36 @@ TEST_F(ActivePictureUpdaterTest, calledWhenDifferentLayerUsesSameProfile) {
TestableLayerFE layerFE2;
EXPECT_CALL(*layer2, getOwnerUid()).WillRepeatedly(Return(uid_t(20)));
- ActivePictureUpdater updater;
+ ActivePictureTracker tracker;
{
layerFE1.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE1.onPictureProfileCommitted();
- updater.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
+ tracker.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
layerFE2.snapshot.pictureProfileHandle = PictureProfileHandle(2);
layerFE2.onPictureProfileCommitted();
- updater.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
+ tracker.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(),
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(),
UnorderedElementsAre({{100, 10, 1}, {200, 20, 2}}));
}
{
layerFE1.snapshot.pictureProfileHandle = PictureProfileHandle(2);
layerFE1.onPictureProfileCommitted();
- updater.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
+ tracker.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
layerFE2.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE2.onPictureProfileCommitted();
- updater.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
+ tracker.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(),
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(),
UnorderedElementsAre({{100, 10, 2}, {200, 20, 1}}));
}
}
-TEST_F(ActivePictureUpdaterTest, calledWhenSameUidUsesSameProfile) {
+TEST_F(ActivePictureTrackerTest, calledWhenSameUidUsesSameProfile) {
sp<NiceMock<MockLayer>> layer1 = sp<NiceMock<MockLayer>>::make(flinger(), 100);
TestableLayerFE layerFE1;
EXPECT_CALL(*layer1, getOwnerUid()).WillRepeatedly(Return(uid_t(10)));
@@ -270,48 +270,48 @@ TEST_F(ActivePictureUpdaterTest, calledWhenSameUidUsesSameProfile) {
TestableLayerFE layerFE2;
EXPECT_CALL(*layer2, getOwnerUid()).WillRepeatedly(Return(uid_t(10)));
- ActivePictureUpdater updater;
+ ActivePictureTracker tracker;
{
layerFE1.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE1.onPictureProfileCommitted();
- updater.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
+ tracker.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
layerFE2.snapshot.pictureProfileHandle = PictureProfileHandle(2);
layerFE2.onPictureProfileCommitted();
- updater.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
+ tracker.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(),
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(),
UnorderedElementsAre({{100, 10, 1}, {200, 10, 2}}));
}
{
layerFE1.snapshot.pictureProfileHandle = PictureProfileHandle(2);
layerFE1.onPictureProfileCommitted();
- updater.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
+ tracker.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
layerFE2.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE2.onPictureProfileCommitted();
- updater.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
+ tracker.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(),
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(),
UnorderedElementsAre({{100, 10, 2}, {200, 10, 1}}));
}
}
-TEST_F(ActivePictureUpdaterTest, calledWhenNewLayerUsesSameProfile) {
+TEST_F(ActivePictureTrackerTest, calledWhenNewLayerUsesSameProfile) {
sp<NiceMock<MockLayer>> layer1 = sp<NiceMock<MockLayer>>::make(flinger(), 100);
TestableLayerFE layerFE1;
EXPECT_CALL(*layer1, getOwnerUid()).WillRepeatedly(Return(uid_t(10)));
- ActivePictureUpdater updater;
+ ActivePictureTracker tracker;
{
layerFE1.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE1.onPictureProfileCommitted();
- updater.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
+ tracker.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(), UnorderedElementsAre({{100, 10, 1}}));
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(), UnorderedElementsAre({{100, 10, 1}}));
}
sp<NiceMock<MockLayer>> layer2 = sp<NiceMock<MockLayer>>::make(flinger(), 200);
@@ -321,14 +321,14 @@ TEST_F(ActivePictureUpdaterTest, calledWhenNewLayerUsesSameProfile) {
{
layerFE1.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE1.onPictureProfileCommitted();
- updater.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
+ tracker.onLayerComposed(*layer1, layerFE1, layerFE1.stealCompositionResult());
layerFE2.snapshot.pictureProfileHandle = PictureProfileHandle(1);
layerFE2.onPictureProfileCommitted();
- updater.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
+ tracker.onLayerComposed(*layer2, layerFE2, layerFE2.stealCompositionResult());
- ASSERT_TRUE(updater.updateAndHasChanged());
- EXPECT_THAT(updater.getActivePictures(),
+ ASSERT_TRUE(tracker.updateAndHasChanged());
+ EXPECT_THAT(tracker.getActivePictures(),
UnorderedElementsAre({{100, 10, 1}, {200, 10, 1}}));
}
}