MCPcopy Create free account
hub / github.com/Tencent/libpag / getPerformanceString

Method getPerformanceString

src/rendering/Performance.cpp:23–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22namespace pag {
23std::string Performance::getPerformanceString() const {
24 char buffer[300];
25 snprintf(buffer, 300,
26 "%6.1fms[Render] %6.1fms[Image] %6.1fms[Video]"
27 " %6.1fms[Texture] %6.1fms[Program] %6.1fms[Present] ",
28 static_cast<double>(renderingTime) / 1000.0,
29 static_cast<double>(imageDecodingTime) / 1000.0,
30 static_cast<double>(softwareDecodingTime + hardwareDecodingTime) / 1000.0,
31 static_cast<double>(textureUploadingTime) / 1000.0,
32 static_cast<double>(programCompilingTime) / 1000.0,
33 static_cast<double>(presentingTime) / 1000.0);
34 return buffer;
35}
36
37void Performance::printPerformance(Frame currentFrame) const {
38 auto performance = getPerformanceString();

Callers 1

CompareFileFramesFunction · 0.80

Calls

no outgoing calls

Tested by 1

CompareFileFramesFunction · 0.64