Fix race between texture viewer creating its thumbnails & first use

This commit is contained in:
baldurk
2015-03-03 12:32:51 +00:00
parent 05fd8374a6
commit 8fa5eb74e6
+7
View File
@@ -741,6 +741,9 @@ namespace renderdocui.Windows
m_Following = new Following(FollowType.OutputColour, 0);
rtPanel.ClearThumbnails();
texPanel.ClearThumbnails();
IntPtr contextHandle = pixelContext.Handle;
IntPtr renderHandle = render.Handle;
m_Core.Renderer.BeginInvoke((ReplayRenderer r) =>
@@ -876,6 +879,8 @@ namespace renderdocui.Windows
if (m_Output == null) return;
UI_CreateThumbnails();
int i = 0;
for(int rt=0; rt < RTs.Length; rt++)
{
@@ -1168,6 +1173,8 @@ namespace renderdocui.Windows
private void UI_CreateThumbnails()
{
if (rtPanel.Thumbnails.Length > 0 || texPanel.Thumbnails.Length > 0) return;
rtPanel.SuspendLayout();
texPanel.SuspendLayout();