Loading services/surfaceflinger/tests/unittests/SurfaceFlinger_FoldableTest.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,14 @@ TEST_P(FoldableTest, disableVsyncOnPowerOffPacesetter) { ASSERT_EQ(mFlinger.scheduler()->pacesetterDisplayId(), getOuterDisplayId()); } TEST_F(FoldableTest, layerCachingTexturePoolOnFrontInternal) { TEST_P(FoldableTest, layerCachingTexturePoolOnFrontInternal) { SET_FLAG_FOR_TEST(flags::pacesetter_selection, GetParam()); ON_CALL(mFlinger.mockSchedulerCallback(), enableLayerCachingTexturePool) .WillByDefault([&](PhysicalDisplayId displayId, bool enable) { mFlinger.enableLayerCachingTexturePool(displayId, enable); }); ASSERT_EQ(mFlinger.scheduler()->pacesetterDisplayId(), getInnerDisplayId()); // In order for TexturePool to be enabled, layer caching needs to be enabled. Loading services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h +4 −0 Original line number Diff line number Diff line Loading @@ -619,6 +619,10 @@ public: mFlinger->mNewLayers.emplace_back(std::move(layer)); } void enableLayerCachingTexturePool(PhysicalDisplayId id, bool enable) { FTL_FAKE_GUARD(kMainThreadContext, mFlinger->enableLayerCachingTexturePool(id, enable)); } /* ------------------------------------------------------------------------ * Read-only access to private data to assert post-conditions. */ Loading Loading
services/surfaceflinger/tests/unittests/SurfaceFlinger_FoldableTest.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,14 @@ TEST_P(FoldableTest, disableVsyncOnPowerOffPacesetter) { ASSERT_EQ(mFlinger.scheduler()->pacesetterDisplayId(), getOuterDisplayId()); } TEST_F(FoldableTest, layerCachingTexturePoolOnFrontInternal) { TEST_P(FoldableTest, layerCachingTexturePoolOnFrontInternal) { SET_FLAG_FOR_TEST(flags::pacesetter_selection, GetParam()); ON_CALL(mFlinger.mockSchedulerCallback(), enableLayerCachingTexturePool) .WillByDefault([&](PhysicalDisplayId displayId, bool enable) { mFlinger.enableLayerCachingTexturePool(displayId, enable); }); ASSERT_EQ(mFlinger.scheduler()->pacesetterDisplayId(), getInnerDisplayId()); // In order for TexturePool to be enabled, layer caching needs to be enabled. Loading
services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h +4 −0 Original line number Diff line number Diff line Loading @@ -619,6 +619,10 @@ public: mFlinger->mNewLayers.emplace_back(std::move(layer)); } void enableLayerCachingTexturePool(PhysicalDisplayId id, bool enable) { FTL_FAKE_GUARD(kMainThreadContext, mFlinger->enableLayerCachingTexturePool(id, enable)); } /* ------------------------------------------------------------------------ * Read-only access to private data to assert post-conditions. */ Loading