summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/tests/common/TestContext.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/tests/common/TestContext.cpp b/libs/hwui/tests/common/TestContext.cpp
index 5e937f3239ff..c1ca1e7ac28a 100644
--- a/libs/hwui/tests/common/TestContext.cpp
+++ b/libs/hwui/tests/common/TestContext.cpp
@@ -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) {