gobjsToRedraw.CopyTo (gotr);
gobjsToRedraw.Clear ();
foreach (GraphicObject p in gotr) {
+ p.IsQueuedForRedraw = false;
p.registerClipRect ();
}
updateTime.Stop ();
ctx.Dispose ();
- sw.WriteLine ("{3}\t{0,8}\t{1,8}\t{2,8}",
+ sw.WriteLine ("{0}\t{1,8}\t{2,8}\t{3,8}\t{4,8}",
+ testId,
layoutTime.ElapsedTicks,
guTime.ElapsedTicks,
updateTime.ElapsedTicks,
- testId);
+ loadTime.ElapsedTicks);
sw.Flush ();
// Console.WriteLine("{3} => layout:{0}ms\tdraw{1}ms\tupdate:{2}ms",
#endregion
#region loading
+ public Stopwatch loadTime = new Stopwatch ();
public GraphicObject LoadTest (string id)
{
testId = id;
+ loadTime.Start ();
GraphicObject tmp = Interface.Load ("Interfaces/" + testId + ".crow", this);
+ loadTime.Stop ();
AddWidget (tmp);
return tmp;
}
sw = new StreamWriter (path);
- sw.WriteLine ("ID layout draw update");
- sw.WriteLine ("------------------------------------------------");
+ sw.WriteLine ("ID layout draw update load");
+ sw.WriteLine ("----------------------------------------------------------------");
sw.Flush ();
}
~NUnitCrowWindow(){
Size _maximumSize = "0;0";
Size _minimumSize = "0;0";
bool cacheEnabled = false;
+ object dataSource;
#endregion
#region public fields
get { return _minimumSize; }
set { _minimumSize = value; }
}
- object dataSource;
-
[XmlIgnore]public virtual object DataSource {
set {
if (dataSource == value)
bmp = null;
RegisterForRedraw ();
}
+ public bool IsQueuedForRedraw = false;
/// <summary>
/// Add clipping region in redraw list of interface, dont update cached object content
/// </summary>
public virtual void RegisterForRedraw ()
{
+ if (IsQueuedForRedraw)
+ return;
//test if this speed up a lot to cancel clipping for an uncached group
Group p = Parent as Group;
if (p != null) {
if (p.bmp == null)
return;
}
- if (HostContainer != null)
- HostContainer.gobjsToRedraw.Add (this);
+ if (HostContainer == null)
+ return;
+ HostContainer.gobjsToRedraw.Add (this);
+ IsQueuedForRedraw = true;
}
#region Layouting
/// this trigger the effective drawing routine </summary>
protected virtual void UpdateGraphic ()
{
- LastPaintedSlot = Slot;
-
int stride = 4 * Slot.Width;
int bmpSize = Math.Abs (stride) * Slot.Height;
if (!Visible)
return;
+ LastPaintedSlot = Slot;
+
Rectangle rb = Parent.ContextCoordinates (Slot);
if (cacheEnabled) {