fix race condition
This commit is contained in:
@@ -244,8 +244,7 @@ public final class Compositor {
|
|||||||
drawTabBar(gc, canvas.getWidth(), topInset);
|
drawTabBar(gc, canvas.getWidth(), topInset);
|
||||||
}
|
}
|
||||||
for (TerminalPane pane : panes) {
|
for (TerminalPane pane : panes) {
|
||||||
pane.paintFull(gc, isActive(pane));
|
paneContentVersion.put(pane, pane.paintFull(gc, isActive(pane)));
|
||||||
paneContentVersion.put(pane, pane.contentVersion());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,8 +261,7 @@ public final class Compositor {
|
|||||||
if (drawn != null && drawn == pane.contentVersion()) {
|
if (drawn != null && drawn == pane.contentVersion()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
pane.paintIncremental(gc, isActive(pane));
|
paneContentVersion.put(pane, pane.paintIncremental(gc, isActive(pane)));
|
||||||
paneContentVersion.put(pane, pane.contentVersion());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -283,13 +283,15 @@ public final class TerminalPane implements AutoCloseable, RenderTarget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Paint the whole pane; see {@link TerminalRenderer#paintFull}. */
|
/** Paint the whole pane; see {@link TerminalRenderer#paintFull}. */
|
||||||
public void paintFull(GraphicsContext gc, boolean active) {
|
public long paintFull(GraphicsContext gc, boolean active) {
|
||||||
renderer.paintFull(gc, this, active);
|
renderer.paintFull(gc, this, active);
|
||||||
|
return snapshotVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Repaint what changed; see {@link TerminalRenderer#paintIncremental}. */
|
/** Repaint what changed; see {@link TerminalRenderer#paintIncremental}. */
|
||||||
public void paintIncremental(GraphicsContext gc, boolean active) {
|
public long paintIncremental(GraphicsContext gc, boolean active) {
|
||||||
renderer.paintIncremental(gc, this, active);
|
renderer.paintIncremental(gc, this, active);
|
||||||
|
return snapshotVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user