Sign in Join
Wiki copytemporary

GraphicTest: what changed

Revision 3 to 4. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11![](/wiki-images/5/58/Graphic_test.png)
22
33## Introduction
44
55GraphicTest is simple program which measure FPS of various direct drawing methods. Aim is to determine fastest method how to copy custom off screen bitmap to visible area on screen.
66
77Listed benchmarks results are dependent on:
88
99- computer hardware
1010- compiler optimizations
1111- operating system
1212- used GUI toolkit
1313- vertical sync and max FPS limit
1414- display color depth (default 32-bit)
1515- resolution of image (default 320x240)
1616
1717In some methods it is necessary to do swapping B a R component of color in some platforms which results to better/worst test score.
1818
1919### Test 1
2020
2121**Hardware:** AMD Turion X2 1,8 GHz, 2 GB RAM, HD2400
2222
2323#### Test 1.1
2424
2525**OS:** Ubuntu 12.10, GNU/Linux kernel 3.5.0 i686, Gtk2
2626
2727| Method | FPS | Frame duration \[ms\] |
2828|--------------------------------------|---------|-----------------------|
2929| TBitmap.Canvas.Pixels | 1 | 1031.7 |
3030| TBitmap.Canvas.Pixels Update locking | 3.2 | 308.1 |
3131| TLazIntfImage.Colors copy | 54.3 | 18.4 |
3232| TLazIntfImage.Colors no copy | 64.4 | 15.5 |
3333| TBitmap.RawImage.Data | 102.2 | 9.8 |
3434| TBitmap.RawImage.Data PaintBox | 102.5 | 9.8 |
3535| TBitmap.RawImage.Data Move | 116 | 8.6 |
3636| TBGRABitmap PaintBox | 123.1 | 8.1 |
3737| TGR32Image | 68.5 | 14.6 |
3838| OpenGL | 56.7 | 17.6 |
3939| OpenGL PBO | 152.4 | 6.6 |
4040| Dummy | 38166.3 | 0 |
4141
4242#### Test 1.2
4343
4444**OS:** Ubuntu 12.10, GNU/Linux kernel 3.5.0 i686, Qt4
4545
4646| Method | FPS | Frame duration \[ms\] |
4747|--------------------------------------|-------|-----------------------|
4848| TBitmap.Canvas.Pixels | 3.2 | 312.8 |
4949| TBitmap.Canvas.Pixels Update locking | 4.3 | 232.3 |
5050| TLazIntfImage.Colors copy | 80.1 | 12.5 |
5151| TLazIntfImage.Colors no copy | 85.1 | 11.7 |
5252| TBitmap.RawImage.Data | 223.4 | 4.5 |
5353| TBitmap.RawImage.Data PaintBox | 225.9 | 4.4 |
5454| TBitmap.RawImage.Data Move | 276.9 | 3.6 |
5555| TBGRABitmap PaintBox | 112.5 | 8.9 |
5656| Dummy | 489.6 | 2 |
5757
5858#### Test 1.3
5959
6060**OS:** Windows 8 32-bit
6161
6262| Method | FPS | Frame duration \[ms\] |
6363|--------------------------------------|--------|-----------------------|
6464| TBitmap.Canvas.Pixels | 2,8 | 351 |
6565| TBitmap.Canvas.Pixels Update locking | 9,6 | 103,9 |
6666| TLazIntfImage.Colors copy | 93,6 | 10,7 |
6767| TLazIntfImage.Colors no copy | 97,8 | 10,2 |
6868| TBitmap.RawImage.Data | 258,2 | 3,9 |
6969| TBitmap.RawImage.Data PaintBox | 256,6 | 3,9 |
7070| TBitmap.RawImage.Data Move | 342,5 | 2,9 |
7171| TBGRABitmap PaintBox | 428 | 2,3 |
7272| TGR32Image | 464,8 | 2,2 |
7373| OpenGL | 221,6 | 4,5 |
7474| OpenGL PBO | 330,7 | 3 |
7575| Dummy | 112824 | 0 |
7676
7777### Test 3
7878
7979**Hardware:** Intel Celeron CPU 2.66 GHz, 1.50 GB RAM, NVIDIA GeForce 6200.
8080
8181**OS:** Windows 7 x86.
8282
8383| Method | FPS | Duration |
8484|--------------------------------------|------|----------|
8585| TBitmap.Canvas.Pixels | 1.44 | 694.82 |
8686| TBitmap.Canvas.Pixels Update locking | 7.81 | 128.07 |
8787| TLazIntfImage.Colors copy | 96.6 | 10.35 |
8888| TLazIntfImage.Colors no copy | 96.7 | 10.34 |
8989| TBitmap.RawImage.Data | 462 | 2.16 |
9090| TBitmap.RawImage.Data PaintBox | 482 | 2.07 |
9191| TBGRABitmap PaintBox | 369 | 2.70 |
9292| OpenGL | 60.2 | 16.61 |
9393| OpenGL PBO | 60.1 | 16.63 |
9494
9595**Conclusion** the faster method (less duration in ms) with highest fps:
9696
97971\) Bitmap.RawImage.Data PaintBox
9898
99992\) TBitmap.RawImage.Data
100100
1011013\) TBGRABitmap PaintBox
102102
103103### Test 4
104104
105105**Hardware:** AMD Sempron 1,6 GHz, 1 GB DDR, NVIDIA GeForce FX 5200
106106
107107**OS:** Windows XP SP3
108108
109109| Method | FPS | Frame duration \[ms\] |
110110|--------------------------------------|-------|-----------------------|
111111| TBitmap.Canvas.Pixels | 3,7 | 267,6 |
112112| TBitmap.Canvas.Pixels Update locking | 12,7 | 78,6 |
113113| TLazIntfImage.Colors copy | 76,2 | 13,1 |
114114| TLazIntfImage.Colors no copy | 85,9 | 11,6 |
115115| TBitmap.RawImage.Data | 205 | 4,9 |
116116| TBitmap.RawImage.Data PaintBox | 295,3 | 3,4 |
117117| TBitmap.RawImage.Data Move | 241,3 | 4,1 |
118118| TBGRABitmap PaintBox | 343,7 | 2,9 |
119119| TGR32Image | 320,8 | 3,1 |
120120| OpenGL | 7,1 | 141,5 |
121121| OpenGL PBO | 6,5 | 154,6 |
122122| Dummy | 88110 | 0 |
123123
124124### Test 5
125125
126126**Conditions:** Intel Core 2 Duo 2,66 GHz; 2 GB DDR2, NVIDIA GeForce 8600 GT, Windows XP SP3 32-bit
127127
128128| Method | FPS | Frame duration \[ms\] |
129129|--------------------------------------|----------|-----------------------|
130130| TBitmap.Canvas.Pixels | 7,2 | 138,9 |
131131| TBitmap.Canvas.Pixels Update locking | 28,4 | 35,2 |
132132| TLazIntfImage.Colors copy | 183,4 | 5,5 |
133133| TLazIntfImage.Colors no copy | 207,8 | 4,8 |
134134| TBitmap.RawImage.Data | 680,8 | 1,5 |
135135| TBitmap.RawImage.Data PaintBox | 1124,5 | 0,9 |
136136| TBitmap.RawImage.Data Move | 781,6 | 1,3 |
137137| TBGRABitmap PaintBox | 1093,2 | 0,9 |
138138| TGR32Image | 1954,1 | 0,5 |
139139| OpenGL | 963,3 | 1 |
140140| OpenGL PBO | 1757,4 | 0,6 |
141141| Dummy | 401069,4 | 0 |
142142
143143### Test 6(20170503)
144144
145145**Conditions:** Intel Core i7-3630QM 2,40 GHz; 8 GB, Windows 8.1 64-bit
146146
147147| Method | FPS | Frame duration \[ms\] |
148148|--------------------------------------|----------|-----------------------|
149149| TBitmap.Canvas.Pixels | 1,8 | 544,8 |
150150| TBitmap.Canvas.Pixels Update locking | 10,0 | 100,1 |
151151| TLazIntfImage.Colors copy | 113,2 | 8,8 |
152152| TLazIntfImage.Colors no copy | 131,8 | 7,6 |
153153| TBitmap.RawImage.Data | 662,9 | 1,5 |
154154| TBitmap.RawImage.Data PaintBox | 650,1 | 1,5 |
155155| TBitmap.RawImage.Data Move | 1047,3 | 1,0 |
156156| TBGRABitmap PaintBox | 640,9 | 1,6 |
157157| OpenGL | 316,0 | 3.2 |
158158| OpenGL PBO | 728,7 | 1,4 |
159159| Dummy | 219514,5 | 0.005 |
160160
161161## Download
162162
163163Application can be downloaded from svn repository:
164164
165-`svn checkout `[`http://svn.zdechov.net/PascalClassLibrary/GraphicTest/`](http://svn.zdechov.net/PascalClassLibrary/GraphicTest/)
165+```text
166+svn checkout http://svn.zdechov.net/PascalClassLibrary/GraphicTest/
167+```
166168
167169## See also
168170
169171- [[Fast direct pixel access]]
170172
171173---
172174*From the Free Pascal wiki, page "GraphicTest", as it stood on 2018-12-21 after a change by Chronos, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history