MCPcopy Create free account
hub / github.com/clementgallet/libTAS / update

Method update

src/library/renderhud/UnityDebug.cpp:97–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void UnityDebug::update(uint64_t framecount)
98{
99 /* Register and reset counts */
100 unsigned int unity_job_count = 0;
101 for (ThreadInfo* th = ThreadManager::getThreadList(); th != nullptr; th = th->next) {
102 if (th->unityJobCount) {
103 jobData.AddPoint(framecount, th->unityJobCount, th->translated_tid);
104 unity_job_count += th->unityJobCount;
105 th->unityJobCount = 0;
106 }
107 }
108
109 jobData.AddPoint(framecount, unity_job_count, 0);
110
111 /* Preload operations */
112 if (preloadPending.size() <= framecount)
113 preloadPending.resize(framecount+1);
114 if (preloadProcessed.size() <= framecount)
115 preloadProcessed.resize(framecount+1);
116
117 preloadPending[framecount] += preload_pending_count;
118 preloadProcessed[framecount] += preload_processed_count;
119
120 /* Build the array that will be used to plot */
121 preloadAll.clear();
122 size_t size = 400;
123 size = std::min(size, preloadPending.size());
124 size = std::min(size, preloadProcessed.size());
125
126 preloadAll.insert(preloadAll.end(), preloadProcessed.end() - size, preloadProcessed.end());
127 preloadAll.insert(preloadAll.end(), preloadPending.end() - size, preloadPending.end());
128}
129
130void UnityDebug::draw(uint64_t framecount, bool* p_open = nullptr)
131{

Callers

nothing calls this directly

Calls 6

AddPointMethod · 0.80
sizeMethod · 0.45
resizeMethod · 0.45
clearMethod · 0.45
insertMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected