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

Commit e10971d9 authored by John Reck's avatar John Reck
Browse files

Fix capturing systrace while hwuimacro is running

Test: manual; ran hwuimacro -c 10000 and started a systrace
while it was running. verified trace tags showed up as
expected

Change-Id: Iedc20c6825e77b76ad79660512b627201f61969f
parent 40eb0ba4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

#include "tests/common/TestContext.h"

#include <cutils/trace.h>

namespace android {
namespace uirenderer {
namespace test {
@@ -98,6 +100,11 @@ void TestContext::createOffscreenSurface() {
}

void TestContext::waitForVsync() {
    // Hacky fix for not getting sysprop change callbacks
    // We just poll the sysprop in vsync since it's when the UI thread is
    // "idle" and shouldn't burn too much time
    atrace_update_tags();

    if (mConsumer.get()) {
        BufferItem buffer;
        if (mConsumer->acquireBuffer(&buffer, 0, false) == OK) {