svgui
1.9
|
#include <RenderTimer.h>
Public Types | |
enum | Type { FastRender, SlowRender, NoTimeout } |
Public Member Functions | |
RenderTimer (Type t) | |
Create a new RenderTimer and start timing. More... | |
bool | outOfTime (double fractionComplete) |
Return true if we have run out of time and should suspend rendering and handle user events instead. More... | |
double | secondsPerItem (int itemsRendered) const |
Private Attributes | |
std::chrono::time_point< std::chrono::steady_clock > | m_start |
bool | m_haveLimits |
double | m_minFraction |
double | m_softLimit |
double | m_hardLimit |
bool | m_softLimitOverridden |
Detailed Description
Definition at line 20 of file RenderTimer.h.
Member Enumeration Documentation
enum RenderTimer::Type |
Enumerator | |
---|---|
FastRender |
A normal rendering operation with normal responsiveness demands. |
SlowRender |
An operation that the user might accept being slower. |
NoTimeout |
An operation that should always complete, i.e. as if there were no RenderTimer in use, but without having to change client code structurally |
Definition at line 23 of file RenderTimer.h.
Constructor & Destructor Documentation
|
inline |
Create a new RenderTimer and start timing.
Make one of these before rendering, and then call outOfTime() regularly during rendering. If outOfTime() returns true, abandon rendering! and schedule the rest for after some user responsiveness has happened.
Definition at line 43 of file RenderTimer.h.
References m_hardLimit, m_haveLimits, m_softLimit, NoTimeout, and SlowRender.
Member Function Documentation
|
inline |
Return true if we have run out of time and should suspend rendering and handle user events instead.
Call this regularly during rendering work: fractionComplete should be an estimate of how much of the work has been done as of this call, as a number between 0.0 (none of it) and 1.0 (all of it).
Definition at line 67 of file RenderTimer.h.
References m_hardLimit, m_haveLimits, m_minFraction, m_softLimit, m_softLimitOverridden, and m_start.
Referenced by Colour3DPlotRenderer::renderDrawBuffer(), and Colour3DPlotRenderer::renderDrawBufferPeakFrequencies().
|
inline |
Definition at line 93 of file RenderTimer.h.
References m_start.
Referenced by Colour3DPlotRenderer::updateTimings().
Member Data Documentation
|
private |
Definition at line 104 of file RenderTimer.h.
Referenced by outOfTime(), and secondsPerItem().
|
private |
Definition at line 105 of file RenderTimer.h.
Referenced by outOfTime(), and RenderTimer().
|
private |
Definition at line 106 of file RenderTimer.h.
Referenced by outOfTime().
|
private |
Definition at line 107 of file RenderTimer.h.
Referenced by outOfTime(), and RenderTimer().
|
private |
Definition at line 108 of file RenderTimer.h.
Referenced by outOfTime(), and RenderTimer().
|
private |
Definition at line 109 of file RenderTimer.h.
Referenced by outOfTime().
The documentation for this class was generated from the following file:
Generated by 1.8.11