diff options
author | Ady Abraham <adyabr@google.com> | 2021-04-01 16:06:11 -0700 |
---|---|---|
committer | Ady Abraham <adyabr@google.com> | 2021-04-06 01:21:30 +0000 |
commit | bdda8f08e38620b071d1c77e8345b141f7fcedfe (patch) | |
tree | f14160f18807dbc693a2d268d4cc5fd68c322d43 /services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp | |
parent | 6c1b7aca75e3fb0d45789b15007202493de6bc3d (diff) |
SF: remove wp<Layer> from LayerHistory
wp::promote has a significant performace impact. Instead we maintain
a copy of the relevant layer information in LayerInfo.
This shows reduction in simpleperf for the main thread
3.07% -> 0.81%
Test: simpleperf for PIP + Notification shade expansion
Test: atest SetFrameRateTest
Bug: 169873384
Change-Id: Ib1414a2db73a4c30a26379a0ba8ba9e639f920ce
Diffstat (limited to 'services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp')
-rw-r--r-- | services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp b/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp index 7ef1f2b378..7e602a29a0 100644 --- a/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp +++ b/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp @@ -523,6 +523,13 @@ TEST_P(SetFrameRateTest, SetOnParentActivatesTree) { parent->setFrameRate(FRAME_RATE_VOTE1); commitTransaction(); + mFlinger.mutableScheduler() + .mutableLayerHistory() + ->record(parent.get(), 0, 0, LayerHistory::LayerUpdateType::Buffer); + mFlinger.mutableScheduler() + .mutableLayerHistory() + ->record(child.get(), 0, 0, LayerHistory::LayerUpdateType::Buffer); + const auto layerHistorySummary = mFlinger.mutableScheduler().mutableLayerHistory()->summarize(0); ASSERT_EQ(2u, layerHistorySummary.size()); |