FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
When window is minimized, d3d present is skipped, hence vsync does not block.
This causes busy message loop pulse->render->pulse when scene changes every frame:
In PresentingPainter
@Override public void run() {
...
valid = validateStageGraphics();
if (!valid) {
...
return;
}
... present skipped when minimized ...
protected boolean validateStageGraphics() {
...
return sceneState.isWindowVisible() && !sceneState.isWindowMinimized();
}
PaintCollector.done:
...
if (needsHint && !toolkit.hasNativeSystemVsync()) {
toolkit.vsyncHint();
}
...
QuantumToolkit.vsyncHint:
if (isVsyncEnabled()) {
...
postPulse();
}
There may be other open bugs caused by this problem, like high cpu on minimize, etc.
----------------------------
The following quick fix solves the issue but more elaborate design may be required:
PaintCollector.done:
...
if (needsHint && !toolkit.hasNativeSystemVsync() &&
sceneState.isValid() && sceneState.isWindowVisible()
&& !sceneState.isWindowMinimized()){
toolkit.vsyncHint();
}
Note it relies on the fact that QuantumRenderer is initialized with single thread.
If more info is required please contact fedor.losev@gmail.com
REPRODUCIBILITY :
This bug can be reproduced always.
A DESCRIPTION OF THE PROBLEM :
When window is minimized, d3d present is skipped, hence vsync does not block.
This causes busy message loop pulse->render->pulse when scene changes every frame:
In PresentingPainter
@Override public void run() {
...
valid = validateStageGraphics();
if (!valid) {
...
return;
}
... present skipped when minimized ...
protected boolean validateStageGraphics() {
...
return sceneState.isWindowVisible() && !sceneState.isWindowMinimized();
}
PaintCollector.done:
...
if (needsHint && !toolkit.hasNativeSystemVsync()) {
toolkit.vsyncHint();
}
...
QuantumToolkit.vsyncHint:
if (isVsyncEnabled()) {
...
postPulse();
}
There may be other open bugs caused by this problem, like high cpu on minimize, etc.
----------------------------
The following quick fix solves the issue but more elaborate design may be required:
PaintCollector.done:
...
if (needsHint && !toolkit.hasNativeSystemVsync() &&
sceneState.isValid() && sceneState.isWindowVisible()
&& !sceneState.isWindowMinimized()){
toolkit.vsyncHint();
}
Note it relies on the fact that QuantumRenderer is initialized with single thread.
If more info is required please contact fedor.losev@gmail.com
REPRODUCIBILITY :
This bug can be reproduced always.
- relates to
-
JDK-8088772 AnimationTimer is unstable when window is minimized
-
- Open
-
-
JDK-8351867 No UI changes while iconified
-
- Open
-