Loading services/surfaceflinger/tests/unittests/RefreshRateSelectionTest.cpp +0 −48 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ #include <gtest/gtest.h> #include <gui/LayerMetadata.h> #include "BufferQueueLayer.h" #include "BufferStateLayer.h" #include "EffectLayer.h" #include "Layer.h" Loading Loading @@ -60,7 +59,6 @@ protected: static constexpr int32_t PRIORITY_UNSET = -1; void setupScheduler(); sp<BufferQueueLayer> createBufferQueueLayer(); sp<BufferStateLayer> createBufferStateLayer(); sp<EffectLayer> createEffectLayer(); Loading Loading @@ -90,12 +88,6 @@ RefreshRateSelectionTest::~RefreshRateSelectionTest() { ALOGD("**** Tearing down after %s.%s\n", test_info->test_case_name(), test_info->name()); } sp<BufferQueueLayer> RefreshRateSelectionTest::createBufferQueueLayer() { sp<Client> client; LayerCreationArgs args(mFlinger.flinger(), client, "buffer-queue-layer", WIDTH, HEIGHT, LAYER_FLAGS, LayerMetadata()); return new BufferQueueLayer(args); } sp<BufferStateLayer> RefreshRateSelectionTest::createBufferStateLayer() { sp<Client> client; Loading Loading @@ -149,46 +141,6 @@ namespace { /* ------------------------------------------------------------------------ * Test cases */ TEST_F(RefreshRateSelectionTest, testPriorityOnBufferQueueLayers) { mParent = createBufferQueueLayer(); mChild = createBufferQueueLayer(); setParent(mChild.get(), mParent.get()); mGrandChild = createBufferQueueLayer(); setParent(mGrandChild.get(), mChild.get()); ASSERT_EQ(PRIORITY_UNSET, mParent->getFrameRateSelectionPriority()); ASSERT_EQ(PRIORITY_UNSET, mChild->getFrameRateSelectionPriority()); ASSERT_EQ(PRIORITY_UNSET, mGrandChild->getFrameRateSelectionPriority()); // Child has its own priority. mGrandChild->setFrameRateSelectionPriority(1); commitTransaction(mGrandChild.get()); ASSERT_EQ(PRIORITY_UNSET, mParent->getFrameRateSelectionPriority()); ASSERT_EQ(PRIORITY_UNSET, mChild->getFrameRateSelectionPriority()); ASSERT_EQ(1, mGrandChild->getFrameRateSelectionPriority()); // Child inherits from his parent. mChild->setFrameRateSelectionPriority(1); commitTransaction(mChild.get()); mGrandChild->setFrameRateSelectionPriority(PRIORITY_UNSET); commitTransaction(mGrandChild.get()); ASSERT_EQ(PRIORITY_UNSET, mParent->getFrameRateSelectionPriority()); ASSERT_EQ(1, mChild->getFrameRateSelectionPriority()); ASSERT_EQ(1, mGrandChild->getFrameRateSelectionPriority()); // Grandchild inherits from his grand parent. mParent->setFrameRateSelectionPriority(1); commitTransaction(mParent.get()); mChild->setFrameRateSelectionPriority(PRIORITY_UNSET); commitTransaction(mChild.get()); mGrandChild->setFrameRateSelectionPriority(PRIORITY_UNSET); commitTransaction(mGrandChild.get()); ASSERT_EQ(1, mParent->getFrameRateSelectionPriority()); ASSERT_EQ(1, mChild->getFrameRateSelectionPriority()); ASSERT_EQ(1, mGrandChild->getFrameRateSelectionPriority()); } TEST_F(RefreshRateSelectionTest, testPriorityOnBufferStateLayers) { mParent = createBufferStateLayer(); mChild = createBufferStateLayer(); Loading services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp +1 −14 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ // TODO(b/129481165): remove the #pragma below and fix conversion issues #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wconversion" #include "BufferQueueLayer.h" #include "BufferStateLayer.h" #include "EffectLayer.h" #include "Layer.h" Loading Loading @@ -65,17 +64,6 @@ protected: static constexpr uint32_t LAYER_FLAGS = 0; }; class BufferQueueLayerFactory : public LayerFactory { public: std::string name() override { return "BufferQueueLayer"; } sp<Layer> createLayer(TestableSurfaceFlinger& flinger) override { sp<Client> client; LayerCreationArgs args(flinger.flinger(), client, "buffer-queue-layer", WIDTH, HEIGHT, LAYER_FLAGS, LayerMetadata()); return new BufferQueueLayer(args); } }; class BufferStateLayerFactory : public LayerFactory { public: std::string name() override { return "BufferStateLayer"; } Loading Loading @@ -417,8 +405,7 @@ TEST_P(SetFrameRateTest, SetAndGetParentNotInTree) { } INSTANTIATE_TEST_SUITE_P(PerLayerType, SetFrameRateTest, testing::Values(std::make_shared<BufferQueueLayerFactory>(), std::make_shared<BufferStateLayerFactory>(), testing::Values(std::make_shared<BufferStateLayerFactory>(), std::make_shared<EffectLayerFactory>()), PrintToStringParamName); Loading Loading
services/surfaceflinger/tests/unittests/RefreshRateSelectionTest.cpp +0 −48 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ #include <gtest/gtest.h> #include <gui/LayerMetadata.h> #include "BufferQueueLayer.h" #include "BufferStateLayer.h" #include "EffectLayer.h" #include "Layer.h" Loading Loading @@ -60,7 +59,6 @@ protected: static constexpr int32_t PRIORITY_UNSET = -1; void setupScheduler(); sp<BufferQueueLayer> createBufferQueueLayer(); sp<BufferStateLayer> createBufferStateLayer(); sp<EffectLayer> createEffectLayer(); Loading Loading @@ -90,12 +88,6 @@ RefreshRateSelectionTest::~RefreshRateSelectionTest() { ALOGD("**** Tearing down after %s.%s\n", test_info->test_case_name(), test_info->name()); } sp<BufferQueueLayer> RefreshRateSelectionTest::createBufferQueueLayer() { sp<Client> client; LayerCreationArgs args(mFlinger.flinger(), client, "buffer-queue-layer", WIDTH, HEIGHT, LAYER_FLAGS, LayerMetadata()); return new BufferQueueLayer(args); } sp<BufferStateLayer> RefreshRateSelectionTest::createBufferStateLayer() { sp<Client> client; Loading Loading @@ -149,46 +141,6 @@ namespace { /* ------------------------------------------------------------------------ * Test cases */ TEST_F(RefreshRateSelectionTest, testPriorityOnBufferQueueLayers) { mParent = createBufferQueueLayer(); mChild = createBufferQueueLayer(); setParent(mChild.get(), mParent.get()); mGrandChild = createBufferQueueLayer(); setParent(mGrandChild.get(), mChild.get()); ASSERT_EQ(PRIORITY_UNSET, mParent->getFrameRateSelectionPriority()); ASSERT_EQ(PRIORITY_UNSET, mChild->getFrameRateSelectionPriority()); ASSERT_EQ(PRIORITY_UNSET, mGrandChild->getFrameRateSelectionPriority()); // Child has its own priority. mGrandChild->setFrameRateSelectionPriority(1); commitTransaction(mGrandChild.get()); ASSERT_EQ(PRIORITY_UNSET, mParent->getFrameRateSelectionPriority()); ASSERT_EQ(PRIORITY_UNSET, mChild->getFrameRateSelectionPriority()); ASSERT_EQ(1, mGrandChild->getFrameRateSelectionPriority()); // Child inherits from his parent. mChild->setFrameRateSelectionPriority(1); commitTransaction(mChild.get()); mGrandChild->setFrameRateSelectionPriority(PRIORITY_UNSET); commitTransaction(mGrandChild.get()); ASSERT_EQ(PRIORITY_UNSET, mParent->getFrameRateSelectionPriority()); ASSERT_EQ(1, mChild->getFrameRateSelectionPriority()); ASSERT_EQ(1, mGrandChild->getFrameRateSelectionPriority()); // Grandchild inherits from his grand parent. mParent->setFrameRateSelectionPriority(1); commitTransaction(mParent.get()); mChild->setFrameRateSelectionPriority(PRIORITY_UNSET); commitTransaction(mChild.get()); mGrandChild->setFrameRateSelectionPriority(PRIORITY_UNSET); commitTransaction(mGrandChild.get()); ASSERT_EQ(1, mParent->getFrameRateSelectionPriority()); ASSERT_EQ(1, mChild->getFrameRateSelectionPriority()); ASSERT_EQ(1, mGrandChild->getFrameRateSelectionPriority()); } TEST_F(RefreshRateSelectionTest, testPriorityOnBufferStateLayers) { mParent = createBufferStateLayer(); mChild = createBufferStateLayer(); Loading
services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp +1 −14 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ // TODO(b/129481165): remove the #pragma below and fix conversion issues #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wconversion" #include "BufferQueueLayer.h" #include "BufferStateLayer.h" #include "EffectLayer.h" #include "Layer.h" Loading Loading @@ -65,17 +64,6 @@ protected: static constexpr uint32_t LAYER_FLAGS = 0; }; class BufferQueueLayerFactory : public LayerFactory { public: std::string name() override { return "BufferQueueLayer"; } sp<Layer> createLayer(TestableSurfaceFlinger& flinger) override { sp<Client> client; LayerCreationArgs args(flinger.flinger(), client, "buffer-queue-layer", WIDTH, HEIGHT, LAYER_FLAGS, LayerMetadata()); return new BufferQueueLayer(args); } }; class BufferStateLayerFactory : public LayerFactory { public: std::string name() override { return "BufferStateLayer"; } Loading Loading @@ -417,8 +405,7 @@ TEST_P(SetFrameRateTest, SetAndGetParentNotInTree) { } INSTANTIATE_TEST_SUITE_P(PerLayerType, SetFrameRateTest, testing::Values(std::make_shared<BufferQueueLayerFactory>(), std::make_shared<BufferStateLayerFactory>(), testing::Values(std::make_shared<BufferStateLayerFactory>(), std::make_shared<EffectLayerFactory>()), PrintToStringParamName); Loading