SF: add vsyncId to SurfaceFlinger::composite trace
Bug: TBD
Test: systrace
Change-Id: I495748be50f0a1c22e52a3a8791a449ea4f388c1
diff --git a/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h b/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h
index d83b9bb..fe0564e 100644
--- a/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h
+++ b/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h
@@ -334,16 +334,14 @@
/* ------------------------------------------------------------------------
* Forwarding for functions being tested
*/
-
nsecs_t commit() {
- constexpr int64_t kVsyncId = 123;
const nsecs_t now = systemTime();
const nsecs_t expectedVsyncTime = now + 10'000'000;
mFlinger->commit(now, kVsyncId, expectedVsyncTime);
return now;
}
- void commitAndComposite() { mFlinger->composite(commit()); }
+ void commitAndComposite() { mFlinger->composite(commit(), kVsyncId); }
auto createDisplay(const String8& displayName, bool secure) {
return mFlinger->createDisplay(displayName, secure);
@@ -877,6 +875,8 @@
};
private:
+ constexpr static int64_t kVsyncId = 123;
+
surfaceflinger::test::Factory mFactory;
sp<SurfaceFlinger> mFlinger;
scheduler::mock::SchedulerCallback mSchedulerCallback;