Skip to content

Guard against render time query failing

David Redondo requested to merge work/davidre/resettimer into master

glGetQuery can fail (for example because of a context loss) in this case the buffer stays unmodified. In this case this is zero resulting in GLRenderTimeQuery::result() returning a negative value. Down the line this leads to a negative duration in the RenderJournal and RenderLoopPrivate::scheduleRepaint starting a timer with an amount of milliseconds bigger than what an int can hold. This will not actually start a timer but QTimer::isActive returns true resulting in no futher repaints being scheduled. BUG: 475605 FIXED-IN: 6.0

Merge request reports