</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug</OutputPath>
- <DefineConstants>TRACE;DEBUG;__linux__;DEBUG_LOAD_TIME0;DEBUG_LAYOUTING0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0</DefineConstants>
+ <DefineConstants>TRACE;DEBUG;__linux__;MEASURE_TIME;DEBUG_LOAD_TIME0;DEBUG_LAYOUTING0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0</DefineConstants>
</PropertyGroup>
<!-- <PropertyGroup Condition=" '$(Platform)' == 'Linux_x86' ">
<DefineConstants>__linux__</DefineConstants>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|Linux_x86" />
<MonoDevelop.Ide.Workbench ActiveDocument="Tests/GOLIBTests.cs">
<Files>
- <File FileName="Tests/Interfaces/testColorList.crow" Line="21" Column="1" />
- <File FileName="src/GraphicObjects/ListBox.cs" Line="36" Column="34" />
- <File FileName="Tests/GOLIBTests.cs" Line="131" Column="31" />
- <File FileName="src/GraphicObjects/GraphicObject.cs" Line="968" Column="1" />
- <File FileName="Tests/Interfaces/colorItem.crow" Line="2" Column="41" />
- <File FileName="src/Colors.cs" Line="143" Column="3" />
+ <File FileName="Tests/GOLIBTests.cs" Line="98" Column="2" />
+ <File FileName="src/GraphicObjects/GraphicObject.cs" Line="538" Column="3" />
+ <File FileName="src/GraphicObjects/Group.cs" Line="197" Column="1" />
+ <File FileName="src/GraphicObjects/PrivateContainer.cs" Line="127" Column="1" />
+ <File FileName="src/OpenTKGameWindow.cs" Line="328" Column="10" />
+ <File FileName="src/Rectangles.cs" Line="90" Column="21" />
+ <File FileName="src/GraphicObjects/Scroller.cs" Line="196" Column="1" />
+ <File FileName="src/LayoutingQueue.cs" Line="30" Column="4" />
+ <File FileName="src/Interface.cs" Line="56" Column="1" />
+ <File FileName="UnitTest/NUnitCrowWindow.cs" Line="163" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
}
ValueChanged.Raise(this, new ValueChangeEventArgs ("fps", _fps));
- ValueChanged.Raise (this, new ValueChangeEventArgs ("update",
- this.updateTime.ElapsedMilliseconds.ToString () + " ms"));
+// ValueChanged.Raise (this, new ValueChangeEventArgs ("update",
+// this.updateTime.ElapsedMilliseconds.ToString () + " ms"));
}
}
}
ValueChanged.Raise(this, new ValueChangeEventArgs ("fps", _fps));
+ #if MEASURE_TIME
ValueChanged.Raise (this, new ValueChangeEventArgs ("update",
- this.updateTime.ElapsedMilliseconds.ToString () + " ms"));
+ this.updateTime.ElapsedTicks.ToString () + " ticks"));
+ ValueChanged.Raise (this, new ValueChangeEventArgs ("layouting",
+ this.layoutTime.ElapsedTicks.ToString () + " ticks"));
ValueChanged.Raise (this, new ValueChangeEventArgs ("drawing",
- this.drawingTime.ElapsedMilliseconds.ToString () + " ms"));
+ this.drawingTime.ElapsedTicks.ToString () + " ticks"));
+ #endif
}
}
}
public string update = "";
public string drawing = "";
+ public string layouting = "";
#endregion
public int intValue = 25;
<?xml version="1.0"?>
<Border BorderWidth="2" Fit="true">
<VerticalStack Fit="true" Margin="5">
- <ListBox Data="{TestList}" Background="0,5;0,5;0,5;0,5"
+ <ListBox Data="{TestList}" Background="0,5;0,5;0,5;0,8"
HorizontalAlignment="Center" Width="-1" Height="350" Margin="5"
ItemTemplate="#Tests.Interfaces.colorItem.crow">
<Template>
<VerticalStack Fit="true" Name="vsFps" Spacing="10" >
<HorizontalStack Fit="true">
<Label Text="Update:" Width="50" TextAlignment="RightCenter"/>
- <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="50" TextAlignment="Center"
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="RightCenter"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
Background="vgradient|0:AoEnglish|1:Black"/>
</HorizontalStack>
<HorizontalStack Fit="true">
<Label Text="Drawing:" Width="50" TextAlignment="RightCenter"/>
- <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="50" TextAlignment="Center"
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
Background="vgradient|0:AoEnglish|1:Black"/>
</HorizontalStack>
<HorizontalStack Fit="true">
<WarningLevel>0</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DefineConstants>DEBUG;TRACE;MEASURE_TIME</DefineConstants>
+ </PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Reference Include="System" />
}
#endregion
- #region update
+ #if MEASURE_TIME
public Stopwatch updateTime = new Stopwatch ();
public Stopwatch layoutTime = new Stopwatch ();
public Stopwatch guTime = new Stopwatch ();
public Stopwatch drawingTime = new Stopwatch ();
+ #endif
+ #region update
void update ()
{
if (mouseRepeatCount > 0) {
FocusedWidget.onMouseClick (this, new MouseButtonEventArgs (Mouse.X, Mouse.Y, MouseButton.Left, true));
}
}
-
- updateTime.Restart ();
+ #if MEASURE_TIME
layoutTime.Reset ();
guTime.Reset ();
drawingTime.Reset ();
+ updateTime.Restart ();
+ #endif
surf = new ImageSurface(bmp, Format.Argb32, ClientRectangle.Width, ClientRectangle.Height,ClientRectangle.Width*4);
ctx = new Context(surf);
GraphicObjects.CopyTo (invGOList,0);
invGOList = invGOList.Reverse ().ToArray ();
+ #if MEASURE_TIME
+ layoutTime.Start ();
+ #endif
//Debug.WriteLine ("======= Layouting queue start =======");
while (Interface.LayoutingQueue.Count > 0) {
// updateTime.ElapsedMilliseconds, lqi.ToString());
// }
}
-
+ #if MEASURE_TIME
+ layoutTime.Stop ();
+ #endif
//Debug.WriteLine ("otd:" + gobjsToRedraw.Count.ToString () + "-");
//final redraw clips should be added only when layout is completed among parents,
foreach (GraphicObject p in gotr) {
p.registerClipRect ();
}
- updateTime.Stop ();
+ #if MEASURE_TIME
+ updateTime.Stop ();
drawingTime.Start ();
+ #endif
lock (redrawClip) {
if (redrawClip.count > 0) {
redrawClip.Reset ();
}
}
+ #if MEASURE_TIME
drawingTime.Stop ();
+ #endif
//surf.WriteToPng (@"/mnt/data/test.png");
ctx.Dispose ();
surf.Dispose ();