Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15311bd8 authored by Pablo Ceballos's avatar Pablo Ceballos
Browse files

Push empty sync transaction before taking screenshot in tests

Because of ag/1043009 it's now necessary to push an empty sync
transaction before taking a screenshot to ensure that all transactions
have been applied.

Bug 29074285

Change-Id: I9f1b4a5b6b1f39e1ff26d536817aef6f40865177
parent e4ecdb66
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -66,6 +66,8 @@ public:
        sp<ISurfaceComposer> sf(ComposerService::getComposerService());
        sp<IBinder> display(sf->getBuiltInDisplay(
                ISurfaceComposer::eDisplayIdMain));
        SurfaceComposerClient::openGlobalTransaction();
        SurfaceComposerClient::closeGlobalTransaction(true);
        ASSERT_EQ(NO_ERROR, sf->captureScreen(display, producer, Rect(), 0, 0,
                0, INT_MAX, false));
        *sc = new ScreenCapture(cpuConsumer);