diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-11-29 16:30:15 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-11-29 16:30:15 +0100 |
| commit | 1e6d9bbb33f98f85e89cd3321ff9c29ffa4fccb0 (patch) | |
| tree | cc9c73091983fc869fec0297c114bed53c4b77ae /src/GraphicObjects | |
| parent | f30bf0d4cc96f160b29a89216326030f083ee509 (diff) | |
debug log view
Diffstat (limited to 'src/GraphicObjects')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 8 | ||||
| -rw-r--r-- | src/GraphicObjects/ScrollingObject.cs | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 686dcb7f..e67b3523 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -51,6 +51,9 @@ namespace Crow { internal ReaderWriterLockSlim parentRWLock = new ReaderWriterLockSlim(); #if DEBUG_LOG + //0 is the main graphic tree, for other obj tree not added to main tree, it range from 1->n + //useful to track events for obj shown later, not on start, or never added to main tree + public int treeIndex; public int yIndex;//absolute index in the graphic tree for debug draw public int xLevel;//x increment for debug draw #endif @@ -1652,7 +1655,7 @@ namespace Crow } protected virtual void UpdateCache(Context ctx){ #if DEBUG_LOG - DebugLog.AddEvent(DbgEvtType.GOUpdateCacheAndPaintOnCTX, this); + DbgEvent dbgEvt = DebugLog.AddEvent(DbgEvtType.GOUpdateCacheAndPaintOnCTX, this); #endif Rectangle rb = Slot + Parent.ClientRectangle.Position; if (clearBackground) { @@ -1666,6 +1669,9 @@ namespace Crow ctx.Paint (); Clipping.Dispose (); Clipping = new Region (); + #if DEBUG_LOG + dbgEvt.end = DebugLog.chrono.ElapsedTicks; + #endif } /// <summary> Chained painting routine on the parent context of the actual cached version /// of the widget </summary> diff --git a/src/GraphicObjects/ScrollingObject.cs b/src/GraphicObjects/ScrollingObject.cs index ea7fd291..855ac0e3 100644 --- a/src/GraphicObjects/ScrollingObject.cs +++ b/src/GraphicObjects/ScrollingObject.cs @@ -68,7 +68,7 @@ namespace Crow if (newS == scrollX) return; - scrollX = value; + scrollX = newS; NotifyValueChanged ("ScrollX", scrollX); RegisterForGraphicUpdate (); |