Loading services/surfaceflinger/TimeStats/TimeStats.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -152,7 +152,7 @@ void TimeStats::flushAvailableRecordsToStatsLocked(const std::string& layerName) LayerRecord& layerRecord = timeStatsTracker[layerName]; TimeRecord& prevTimeRecord = layerRecord.prevTimeRecord; std::vector<TimeRecord>& timeRecords = layerRecord.timeRecords; std::deque<TimeRecord>& timeRecords = layerRecord.timeRecords; while (!timeRecords.empty()) { if (!recordReadyLocked(layerName, &timeRecords[0])) break; ALOGV("[%s]-[%" PRIu64 "]-presentFenceTime[%" PRId64 "]", layerName.c_str(), Loading Loading @@ -199,8 +199,7 @@ void TimeStats::flushAvailableRecordsToStatsLocked(const std::string& layerName) timeStats.stats[layerName].statsEnd = static_cast<int64_t>(std::time(0)); } prevTimeRecord = timeRecords[0]; // TODO(zzyiwei): change timeRecords to use std::deque timeRecords.erase(timeRecords.begin()); timeRecords.pop_front(); layerRecord.waitData--; } } Loading services/surfaceflinger/TimeStats/TimeStats.h +2 −2 Original line number Diff line number Diff line Loading @@ -25,9 +25,9 @@ #include <utils/String8.h> #include <utils/Vector.h> #include <deque> #include <mutex> #include <unordered_map> #include <vector> using namespace android::surfaceflinger; Loading Loading @@ -57,7 +57,7 @@ class TimeStats { // fences to signal, but rather waiting to receive those fences/timestamps. int32_t waitData = -1; TimeRecord prevTimeRecord; std::vector<TimeRecord> timeRecords; std::deque<TimeRecord> timeRecords; }; public: Loading Loading
services/surfaceflinger/TimeStats/TimeStats.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -152,7 +152,7 @@ void TimeStats::flushAvailableRecordsToStatsLocked(const std::string& layerName) LayerRecord& layerRecord = timeStatsTracker[layerName]; TimeRecord& prevTimeRecord = layerRecord.prevTimeRecord; std::vector<TimeRecord>& timeRecords = layerRecord.timeRecords; std::deque<TimeRecord>& timeRecords = layerRecord.timeRecords; while (!timeRecords.empty()) { if (!recordReadyLocked(layerName, &timeRecords[0])) break; ALOGV("[%s]-[%" PRIu64 "]-presentFenceTime[%" PRId64 "]", layerName.c_str(), Loading Loading @@ -199,8 +199,7 @@ void TimeStats::flushAvailableRecordsToStatsLocked(const std::string& layerName) timeStats.stats[layerName].statsEnd = static_cast<int64_t>(std::time(0)); } prevTimeRecord = timeRecords[0]; // TODO(zzyiwei): change timeRecords to use std::deque timeRecords.erase(timeRecords.begin()); timeRecords.pop_front(); layerRecord.waitData--; } } Loading
services/surfaceflinger/TimeStats/TimeStats.h +2 −2 Original line number Diff line number Diff line Loading @@ -25,9 +25,9 @@ #include <utils/String8.h> #include <utils/Vector.h> #include <deque> #include <mutex> #include <unordered_map> #include <vector> using namespace android::surfaceflinger; Loading Loading @@ -57,7 +57,7 @@ class TimeStats { // fences to signal, but rather waiting to receive those fences/timestamps. int32_t waitData = -1; TimeRecord prevTimeRecord; std::vector<TimeRecord> timeRecords; std::deque<TimeRecord> timeRecords; }; public: Loading