| 275 | } |
| 276 | |
| 277 | bool RenderLoop::activeWindowControlsVrrRefreshRate() const |
| 278 | { |
| 279 | if (Q_UNLIKELY(!workspace())) { |
| 280 | return false; |
| 281 | } |
| 282 | |
| 283 | Window *const activeWindow = workspace()->activeWindow(); |
| 284 | LogicalOutput *logical = workspace()->findOutput(d->output); |
| 285 | if (!logical) { |
| 286 | return false; |
| 287 | } |
| 288 | return activeWindow |
| 289 | && activeWindow->frameGeometry().intersects(logical->geometryF()) |
| 290 | && activeWindow->surfaceItem() |
| 291 | && activeWindow->surfaceItem()->recursiveFrameTimeEstimation().transform([](const auto t) { |
| 292 | return t <= std::chrono::nanoseconds(1'000'000'000) / 30; |
| 293 | }).value_or(false); |
| 294 | } |
| 295 | |
| 296 | std::chrono::nanoseconds RenderLoop::lastPresentationTimestamp() const |
| 297 | { |
no test coverage detected