aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/PerfTests
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-11-24 23:50:38 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-11-24 23:50:38 +0100
commitb25ad7a6e15a7284e40407377a1624747ffe42e5 (patch)
treef53a12fb2120eb7f1b82ccfbda37a2430c5be330 /Samples/PerfTests
parent09026f4328d0e578823062d6506ffdacac457b25 (diff)
IBackend instead of IDevice to bind to Interface
Diffstat (limited to 'Samples/PerfTests')
-rw-r--r--Samples/PerfTests/Program.cs22
1 files changed, 13 insertions, 9 deletions
diff --git a/Samples/PerfTests/Program.cs b/Samples/PerfTests/Program.cs
index d7f6a9be..cbe62738 100644
--- a/Samples/PerfTests/Program.cs
+++ b/Samples/PerfTests/Program.cs
@@ -64,7 +64,7 @@ namespace PerfTests
}
public TestInterface (string[] args, int width = 800, int height = 600)
- : base (width, height, false, false)
+ : base (width, height, true, false)
{
string outDir = null;
@@ -141,15 +141,10 @@ namespace PerfTests
writer.WriteLine ("Path;MinEllapsed;MaxEllapsed;MeanEllapsed;MedianEllapsed;sigmaEllapsed;MinMem;MaxMem;MeanMem;MedianMem;sigmaMem;MinAlloc;MaxAlloc;MeanAlloc;MedianAlloc;sigmaAlloc");
}
- if (screenOutput) {
- initBackend ();
+ if (screenOutput)
initSurface ();
- } else {
- SolidBackground = false;
- initBackend (true);
-
- CreateMainSurface (ref clientRectangle);
- }
+ else
+ initBackend ();
initDictionaries ();
loadStyling ();
@@ -163,6 +158,15 @@ namespace PerfTests
outStream.Dispose ();
}
}
+ protected override void initBackend()
+ {
+ if (screenOutput)
+ backend = new Crow.CairoBackend.ImageBackend (WindowHandle, clientRectangle.Width, clientRectangle.Height);
+ else
+ backend = new Crow.CairoBackend.ImageBackend (clientRectangle.Width, clientRectangle.Height);
+
+ clipping = Backend.CreateRegion ();
+ }
struct Measures
{