Sign in Join
Wiki copytemporary

GraphicTest: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-<figure>
21<img src="Graphic_test.png" title="Graphic_test.png" width="400" />
3-<figcaption>Graphic_test.png</figcaption>
4-</figure>
52
63## Introduction
74
85GraphicTest 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.
96
107Listed benchmarks results are dependent on:
118
129- computer hardware
1310- compiler optimizations
1411- operating system
1512- used GUI toolkit
1613- vertical sync and max FPS limit
1714- display color depth (default 32-bit)
1815- resolution of image (default 320x240)
1916
2017In some methods it is necessary to do swapping B a R component of color in some platforms which results to better/worst test score.
2118
2219### Test 1
2320
2421**Hardware:** AMD Turion X2 1,8 GHz, 2 GB RAM, HD2400
2522
2623#### Test 1.1
2724
2825**OS:** Ubuntu 12.10, GNU/Linux kernel 3.5.0 i686, Gtk2
2926
3027| Method | FPS | Frame duration \[ms\] |
3128|--------------------------------------|---------|-----------------------|
3229| TBitmap.Canvas.Pixels | 1 | 1031.7 |
3330| TBitmap.Canvas.Pixels Update locking | 3.2 | 308.1 |
3431| TLazIntfImage.Colors copy | 54.3 | 18.4 |
3532| TLazIntfImage.Colors no copy | 64.4 | 15.5 |
3633| TBitmap.RawImage.Data | 102.2 | 9.8 |
3734| TBitmap.RawImage.Data PaintBox | 102.5 | 9.8 |
3835| TBitmap.RawImage.Data Move | 116 | 8.6 |
3936| TBGRABitmap PaintBox | 123.1 | 8.1 |
4037| TGR32Image | 68.5 | 14.6 |
4138| OpenGL | 56.7 | 17.6 |
4239| OpenGL PBO | 152.4 | 6.6 |
4340| Dummy | 38166.3 | 0 |
4441
4542#### Test 1.2
4643
4744**OS:** Ubuntu 12.10, GNU/Linux kernel 3.5.0 i686, Qt4
4845
4946| Method | FPS | Frame duration \[ms\] |
5047|--------------------------------------|-------|-----------------------|
5148| TBitmap.Canvas.Pixels | 3.2 | 312.8 |
5249| TBitmap.Canvas.Pixels Update locking | 4.3 | 232.3 |
5350| TLazIntfImage.Colors copy | 80.1 | 12.5 |
5451| TLazIntfImage.Colors no copy | 85.1 | 11.7 |
5552| TBitmap.RawImage.Data | 223.4 | 4.5 |
5653| TBitmap.RawImage.Data PaintBox | 225.9 | 4.4 |
5754| TBitmap.RawImage.Data Move | 276.9 | 3.6 |
5855| TBGRABitmap PaintBox | 112.5 | 8.9 |
5956| Dummy | 489.6 | 2 |
6057
6158#### Test 1.3
6259
6360**OS:** Windows 8 32-bit
6461
6562| Method | FPS | Frame duration \[ms\] |
6663|--------------------------------------|--------|-----------------------|
6764| TBitmap.Canvas.Pixels | 2,8 | 351 |
6865| TBitmap.Canvas.Pixels Update locking | 9,6 | 103,9 |
6966| TLazIntfImage.Colors copy | 93,6 | 10,7 |
7067| TLazIntfImage.Colors no copy | 97,8 | 10,2 |
7168| TBitmap.RawImage.Data | 258,2 | 3,9 |
7269| TBitmap.RawImage.Data PaintBox | 256,6 | 3,9 |
7370| TBitmap.RawImage.Data Move | 342,5 | 2,9 |
7471| TBGRABitmap PaintBox | 428 | 2,3 |
7572| TGR32Image | 464,8 | 2,2 |
7673| OpenGL | 221,6 | 4,5 |
7774| OpenGL PBO | 330,7 | 3 |
7875| Dummy | 112824 | 0 |
7976
8077### Test 3
8178
8279**Hardware:** Intel Celeron CPU 2.66 GHz, 1.50 GB RAM, NVIDIA GeForce 6200.
8380
8481**OS:** Windows 7 x86.
8582
8683| Method | FPS | Duration |
8784|--------------------------------------|------|----------|
8885| TBitmap.Canvas.Pixels | 1.44 | 694.82 |
8986| TBitmap.Canvas.Pixels Update locking | 7.81 | 128.07 |
9087| TLazIntfImage.Colors copy | 96.6 | 10.35 |
9188| TLazIntfImage.Colors no copy | 96.7 | 10.34 |
9289| TBitmap.RawImage.Data | 462 | 2.16 |
9390| TBitmap.RawImage.Data PaintBox | 482 | 2.07 |
9491| TBGRABitmap PaintBox | 369 | 2.70 |
9592| OpenGL | 60.2 | 16.61 |
9693| OpenGL PBO | 60.1 | 16.63 |
9794
9895**Conclusion** the faster method (less duration in ms) with highest fps:
9996
100971\) Bitmap.RawImage.Data PaintBox
10198
102992\) TBitmap.RawImage.Data
103100
1041013\) TBGRABitmap PaintBox
105102
106103### Test 4
107104
108105**Hardware:** AMD Sempron 1,6 GHz, 1 GB DDR, NVIDIA GeForce FX 5200
109106
110107**OS:** Windows XP SP3
111108
112109| Method | FPS | Frame duration \[ms\] |
113110|--------------------------------------|-------|-----------------------|
114111| TBitmap.Canvas.Pixels | 3,7 | 267,6 |
115112| TBitmap.Canvas.Pixels Update locking | 12,7 | 78,6 |
116113| TLazIntfImage.Colors copy | 76,2 | 13,1 |
117114| TLazIntfImage.Colors no copy | 85,9 | 11,6 |
118115| TBitmap.RawImage.Data | 205 | 4,9 |
119116| TBitmap.RawImage.Data PaintBox | 295,3 | 3,4 |
120117| TBitmap.RawImage.Data Move | 241,3 | 4,1 |
121118| TBGRABitmap PaintBox | 343,7 | 2,9 |
122119| TGR32Image | 320,8 | 3,1 |
123120| OpenGL | 7,1 | 141,5 |
124121| OpenGL PBO | 6,5 | 154,6 |
125122| Dummy | 88110 | 0 |
126123
127124### Test 5
128125
129126**Conditions:** Intel Core 2 Duo 2,66 GHz; 2 GB DDR2, NVIDIA GeForce 8600 GT, Windows XP SP3 32-bit
130127
131128| Method | FPS | Frame duration \[ms\] |
132129|--------------------------------------|----------|-----------------------|
133130| TBitmap.Canvas.Pixels | 7,2 | 138,9 |
134131| TBitmap.Canvas.Pixels Update locking | 28,4 | 35,2 |
135132| TLazIntfImage.Colors copy | 183,4 | 5,5 |
136133| TLazIntfImage.Colors no copy | 207,8 | 4,8 |
137134| TBitmap.RawImage.Data | 680,8 | 1,5 |
138135| TBitmap.RawImage.Data PaintBox | 1124,5 | 0,9 |
139136| TBitmap.RawImage.Data Move | 781,6 | 1,3 |
140137| TBGRABitmap PaintBox | 1093,2 | 0,9 |
141138| TGR32Image | 1954,1 | 0,5 |
142139| OpenGL | 963,3 | 1 |
143140| OpenGL PBO | 1757,4 | 0,6 |
144141| Dummy | 401069,4 | 0 |
145142
146143### Test 6(20170503)
147144
148145**Conditions:** Intel Core i7-3630QM 2,40 GHz; 8 GB, Windows 8.1 64-bit
149146
150147| Method | FPS | Frame duration \[ms\] |
151148|--------------------------------------|----------|-----------------------|
152149| TBitmap.Canvas.Pixels | 1,8 | 544,8 |
153150| TBitmap.Canvas.Pixels Update locking | 10,0 | 100,1 |
154151| TLazIntfImage.Colors copy | 113,2 | 8,8 |
155152| TLazIntfImage.Colors no copy | 131,8 | 7,6 |
156153| TBitmap.RawImage.Data | 662,9 | 1,5 |
157154| TBitmap.RawImage.Data PaintBox | 650,1 | 1,5 |
158155| TBitmap.RawImage.Data Move | 1047,3 | 1,0 |
159156| TBGRABitmap PaintBox | 640,9 | 1,6 |
160157| OpenGL | 316,0 | 3.2 |
161158| OpenGL PBO | 728,7 | 1,4 |
162159| Dummy | 219514,5 | 0.005 |
163160
164161## Download
165162
166163Application can be downloaded from svn repository:
167164
168165`svn checkout `[`http://svn.zdechov.net/PascalClassLibrary/GraphicTest/`](http://svn.zdechov.net/PascalClassLibrary/GraphicTest/)
169166
170167## See also
171168
172169- [[Fast direct pixel access]]
173170
174171---
175172*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