diff options
Diffstat (limited to 'services/surfaceflinger/tests/LayerTransaction_test.cpp')
-rw-r--r-- | services/surfaceflinger/tests/LayerTransaction_test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/surfaceflinger/tests/LayerTransaction_test.cpp b/services/surfaceflinger/tests/LayerTransaction_test.cpp index 03de8d0b6d..ea141f3257 100644 --- a/services/surfaceflinger/tests/LayerTransaction_test.cpp +++ b/services/surfaceflinger/tests/LayerTransaction_test.cpp @@ -213,6 +213,15 @@ TEST_F(LayerTransactionTest, CommitCallbackCalledOnce) { ASSERT_EQ(callCount, 1); } +TEST_F(LayerTransactionTest, AddRemoveLayers) { + for (int i = 0; i < 100; i++) { + sp<SurfaceControl> layer; + ASSERT_NO_FATAL_FAILURE( + layer = createLayer("test", 32, 32, ISurfaceComposerClient::eFXSurfaceBufferState)); + layer.clear(); + } +} + } // namespace android // TODO(b/129481165): remove the #pragma below and fix conversion issues |