diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-04 11:43:15 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-04 11:43:15 +0100 |
| commit | 78a35f84e4cfec562f3ab6c76c746acbb6de3fec (patch) | |
| tree | 3474d14e16c8a5b95d34d1669af763d7476d5942 /src/Interface.cs | |
| parent | 1ba15ebcac390fae4ee4e7cda91f8c473913a5af (diff) | |
* Interface.cs:
maxLayoutTries = 3; max discard = 5, test if dirtyRect.width != 0, lqi logging removed because lqi is now a struct
* LayoutingQueueItem.cs:
lqi logging removed
Diffstat (limited to 'src/Interface.cs')
| -rw-r--r-- | src/Interface.cs | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/Interface.cs b/src/Interface.cs index de348d94..ddd5bfcf 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -82,8 +82,8 @@ namespace Crow public const int MaxCacheSize = 2048; /// <summary> Above this count, the layouting is discard for the widget and it /// will not be rendered on screen </summary> - public const int MaxLayoutingTries = 5; - public const int MaxDiscardCount = 10; + public const int MaxLayoutingTries = 3; + public const int MaxDiscardCount = 5; /// <summary> Global font rendering settings for Cairo </summary> public static FontOptions FontRenderingOptions; #endregion @@ -321,7 +321,7 @@ namespace Crow // public static LayoutingQueueItem[] MultipleRunsLQIs { // get { return curUpdateLQIs.Where(l=>l.LayoutingTries>2 || l.DiscardCount > 0).ToArray(); } // } - public LayoutingQueueItem currentLQI = null; + public LayoutingQueueItem currentLQI; #else public List<LQIList> LQIs = null;//still create the var for CrowIDE #endif @@ -384,9 +384,6 @@ namespace Crow curLQIsTries.Add(currentLQI); #endif lqi.ProcessLayouting (); - #if DEBUG_LAYOUTING - currentLQI = null; - #endif } LayoutingQueue = DiscardQueue; } @@ -406,8 +403,7 @@ namespace Crow g = DrawingQueue.Dequeue (); g.IsQueueForRedraw = false; g.Parent.RegisterClip (g.LastPaintedSlot); - if (g.getSlot () != g.LastPaintedSlot) - g.Parent.RegisterClip (g.getSlot ()); + g.Parent.RegisterClip (g.getSlot ()); } #if MEASURE_TIME @@ -454,12 +450,15 @@ namespace Crow DirtyRect.Width = Math.Max (0, DirtyRect.Width); DirtyRect.Height = Math.Max (0, DirtyRect.Height); - dirtyBmp = new byte[4 * DirtyRect.Width * DirtyRect.Height]; - for (int y = 0; y < DirtyRect.Height; y++) { - Array.Copy (bmp, - ((DirtyRect.Top + y) * ClientRectangle.Width * 4) + DirtyRect.Left * 4, - dirtyBmp, y * DirtyRect.Width * 4, DirtyRect.Width * 4); - } + if (DirtyRect.Width > 0) { + dirtyBmp = new byte[4 * DirtyRect.Width * DirtyRect.Height]; + for (int y = 0; y < DirtyRect.Height; y++) { + Array.Copy (bmp, + ((DirtyRect.Top + y) * ClientRectangle.Width * 4) + DirtyRect.Left * 4, + dirtyBmp, y * DirtyRect.Width * 4, DirtyRect.Width * 4); + } + } else + IsDirty = false; } clipping.Reset (); } |