summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/SurfaceTracing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/SurfaceTracing.cpp')
-rw-r--r--services/surfaceflinger/SurfaceTracing.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/surfaceflinger/SurfaceTracing.cpp b/services/surfaceflinger/SurfaceTracing.cpp
index 9053f2c7de..5d9be0b8a9 100644
--- a/services/surfaceflinger/SurfaceTracing.cpp
+++ b/services/surfaceflinger/SurfaceTracing.cpp
@@ -68,8 +68,9 @@ bool SurfaceTracing::addTraceToBuffer(LayersTraceProto& entry) {
return mEnabled;
}
-void SurfaceTracing::notify(const char* where) {
+void SurfaceTracing::notify(long compositionTime, const char* where) {
std::scoped_lock lock(mSfLock);
+ mCompositionTime = compositionTime;
mWhere = where;
mCanStartTrace.notify_one();
}
@@ -160,7 +161,7 @@ LayersTraceProto SurfaceTracing::traceLayersLocked(const char* where) {
ATRACE_CALL();
LayersTraceProto entry;
- entry.set_elapsed_realtime_nanos(elapsedRealtimeNano());
+ entry.set_elapsed_realtime_nanos(mCompositionTime);
entry.set_where(where);
LayersProto layers(mFlinger.dumpDrawingStateProto(mTraceFlags));
entry.mutable_layers()->Swap(&layers);