diff options
| author | 2019-09-05 16:53:28 +0000 | |
|---|---|---|
| committer | 2019-09-05 16:53:28 +0000 | |
| commit | b653dd0a088f3be9d0fccd3d2099b3f8ab63ca2c (patch) | |
| tree | a3796f67d19deece6118e60d2faebde9499ce083 /services/surfaceflinger/FrameTracker.cpp | |
| parent | 0bc2361309d705f8c7f7766f1912fd0f7035d199 (diff) | |
| parent | 9c724d78b9f2e00a7d4de3bfd2c65f6226fa8529 (diff) | |
Merge "DO NOT MERGE - Merge Android 10 into master"
Diffstat (limited to 'services/surfaceflinger/FrameTracker.cpp')
| -rw-r--r-- | services/surfaceflinger/FrameTracker.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/services/surfaceflinger/FrameTracker.cpp b/services/surfaceflinger/FrameTracker.cpp index 1539873aaa..f4cc49b851 100644 --- a/services/surfaceflinger/FrameTracker.cpp +++ b/services/surfaceflinger/FrameTracker.cpp @@ -19,6 +19,7 @@ #include <inttypes.h> +#include <android-base/stringprintf.h> #include <android/log.h> #include <utils/String8.h> @@ -230,17 +231,17 @@ bool FrameTracker::isFrameValidLocked(size_t idx) const { mFrameRecords[idx].actualPresentTime < INT64_MAX; } -void FrameTracker::dumpStats(String8& result) const { +void FrameTracker::dumpStats(std::string& result) const { Mutex::Autolock lock(mMutex); processFencesLocked(); const size_t o = mOffset; for (size_t i = 1; i < NUM_FRAME_RECORDS; i++) { const size_t index = (o+i) % NUM_FRAME_RECORDS; - result.appendFormat("%" PRId64 "\t%" PRId64 "\t%" PRId64 "\n", - mFrameRecords[index].desiredPresentTime, - mFrameRecords[index].actualPresentTime, - mFrameRecords[index].frameReadyTime); + base::StringAppendF(&result, "%" PRId64 "\t%" PRId64 "\t%" PRId64 "\n", + mFrameRecords[index].desiredPresentTime, + mFrameRecords[index].actualPresentTime, + mFrameRecords[index].frameReadyTime); } result.append("\n"); } |