mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Add slight delay before calling PixelHistory to allow for painting
This commit is contained in:
@@ -2588,15 +2588,23 @@ namespace renderdocui.Windows
|
||||
|
||||
hist.Show(DockPanel);
|
||||
|
||||
m_Core.Renderer.BeginInvoke((ReplayRenderer r) =>
|
||||
// add a short delay so that controls repainting after a new panel appears can get at the
|
||||
// render thread before we insert the long blocking pixel history task
|
||||
var delayedHistory = new BackgroundWorker();
|
||||
delayedHistory.DoWork += delegate
|
||||
{
|
||||
history = r.PixelHistory(CurrentTexture.ID, (UInt32)m_PickedPoint.X, (UInt32)m_PickedPoint.Y);
|
||||
|
||||
this.BeginInvoke(new Action(() =>
|
||||
Thread.Sleep(100);
|
||||
m_Core.Renderer.BeginInvoke((ReplayRenderer r) =>
|
||||
{
|
||||
hist.SetHistory(history);
|
||||
}));
|
||||
});
|
||||
history = r.PixelHistory(CurrentTexture.ID, (UInt32)m_PickedPoint.X, (UInt32)m_PickedPoint.Y);
|
||||
|
||||
this.BeginInvoke(new Action(() =>
|
||||
{
|
||||
hist.SetHistory(history);
|
||||
}));
|
||||
});
|
||||
};
|
||||
delayedHistory.RunWorkerAsync();
|
||||
}
|
||||
|
||||
private void debugPixel_Click(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user