Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2455,16 +2455,16 @@ void Application::idle(uint64_t now) { · 2454 unmodified lines | ||
| 2455 | 2455 | _renderedFrameIndex = INVALID_FRAME; |
| 2456 | 2456 | } |
| 2457 | 2457 | |
| 2458 | − // Don't saturate the main thread with rendering, no paint calls until the last one is complete | |
| 2459 | − // Also no paint calls until the display plugin has increased by at least one frame | |
| 2460 | − // (don't render at 90fps if the display plugin only goes at 60) | |
| 2458 | + // Don't saturate the main thread with rendering and simulation, | |
| 2459 | + // unless display plugin has increased by at least one frame | |
| 2461 | 2460 | if (_renderedFrameIndex == INVALID_FRAME || presentCount > _renderedFrameIndex) { |
| 2462 | 2461 | // Record what present frame we're on |
| 2463 | 2462 | _renderedFrameIndex = presentCount; |
| 2464 | 2463 | |
| 2465 | − // But when we DO request a paint, get to it as soon as possible: high priority | |
| 2464 | + // request a paint, get to it as soon as possible: high priority | |
| 2466 | 2465 | postEvent(this, new QEvent(static_cast<QEvent::Type>(Paint)), Qt::HighEventPriority); |
| 2467 | 2466 | } else { |
| 2467 | + // there's no use in simulating or rendering faster then the present rate. | |
| 2468 | 2468 | return; |
| 2469 | 2469 | } |
| 2470 | 2470 | |