From 3d3e97a4f86c5efd7292142f74dbd2f1168b61d0 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Tue, 3 Jan 2017 13:20:21 +0100 Subject: * Grid.cs, TabView.cs, Wrapper.cs, GenericStack.cs, GraphicObject.cs: IsDirty instead of deleting bmp, resolve blinking bug * Interface.cs: DrawingQueue locked inside the foreach loop, once per item * OpenTKGameWindow.cs: non blocking mutex inside render frame loop --- src/GraphicObjects/GenericStack.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/GraphicObjects/GenericStack.cs') diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs index 840e883f..a2d78d88 100644 --- a/src/GraphicObjects/GenericStack.cs +++ b/src/GraphicObjects/GenericStack.cs @@ -84,7 +84,7 @@ namespace Crow d += c.Slot.Height + Spacing; } } - bmp = null; + IsDirty = true; } GraphicObject stretchedGO = null; public override bool UpdateLayout (LayoutingType layoutType) @@ -99,7 +99,7 @@ namespace Crow ComputeChildrenPositions (); //if no layouting remains in queue for item, registre for redraw - if (RegisteredLayoutings == LayoutingType.None && bmp == null) + if (RegisteredLayoutings == LayoutingType.None && IsDirty) CurrentInterface.EnqueueForRepaint (this); return true; @@ -134,7 +134,7 @@ namespace Crow newW = Math.Min (newW, stretchedGO.MaximumSize.Width); if (newW != stretchedGO.Slot.Width) { stretchedGO.Slot.Width = newW; - stretchedGO.bmp = null; + stretchedGO.IsDirty = true; #if DEBUG_LAYOUTING Debug.WriteLine ("\tAdjusting Width of " + stretchedGO.ToString()); #endif @@ -173,7 +173,7 @@ namespace Crow newH = Math.Min (newH, stretchedGO.MaximumSize.Height); if (newH != stretchedGO.Slot.Height) { stretchedGO.Slot.Height = newH; - stretchedGO.bmp = null; + stretchedGO.IsDirty = true; #if DEBUG_LAYOUTING Debug.WriteLine ("\tAdjusting Height of " + stretchedGO.ToString()); #endif -- cgit v1.3.1-4-g156e