| 21 | |
| 22 | namespace pag { |
| 23 | std::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 | |
| 37 | void Performance::printPerformance(Frame currentFrame) const { |
| 38 | auto performance = getPerformanceString(); |
no outgoing calls