GraphicTest: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: GraphicTest
| Old | New | Line | |
|---|---|---|---|
| 1 | + | <figure> | |
| 2 | + | <img src="Graphic_test.png" title="Graphic_test.png" width="400" /> | |
| 3 | + | <figcaption>Graphic_test.png</figcaption> | |
| 4 | + | </figure> | |
| 5 | + | ||
| 6 | + | ## Introduction | |
| 7 | + | ||
| 8 | + | GraphicTest 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. | |
| 9 | + | ||
| 10 | + | Listed benchmarks results are dependent on: | |
| 11 | + | ||
| 12 | + | - computer hardware | |
| 13 | + | - compiler optimizations | |
| 14 | + | - operating system | |
| 15 | + | - used GUI toolkit | |
| 16 | + | - vertical sync and max FPS limit | |
| 17 | + | - display color depth (default 32-bit) | |
| 18 | + | - resolution of image (default 320x240) | |
| 19 | + | ||
| 20 | + | In some methods it is necessary to do swapping B a R component of color in some platforms which results to better/worst test score. | |
| 21 | + | ||
| 22 | + | ### Test 1 | |
| 23 | + | ||
| 24 | + | **Hardware:** AMD Turion X2 1,8 GHz, 2 GB RAM, HD2400 | |
| 25 | + | ||
| 26 | + | #### Test 1.1 | |
| 27 | + | ||
| 28 | + | **OS:** Ubuntu 12.10, GNU/Linux kernel 3.5.0 i686, Gtk2 | |
| 29 | + | ||
| 30 | + | | Method | FPS | Frame duration \[ms\] | | |
| 31 | + | |--------------------------------------|---------|-----------------------| | |
| 32 | + | | TBitmap.Canvas.Pixels | 1 | 1031.7 | | |
| 33 | + | | TBitmap.Canvas.Pixels Update locking | 3.2 | 308.1 | | |
| 34 | + | | TLazIntfImage.Colors copy | 54.3 | 18.4 | | |
| 35 | + | | TLazIntfImage.Colors no copy | 64.4 | 15.5 | | |
| 36 | + | | TBitmap.RawImage.Data | 102.2 | 9.8 | | |
| 37 | + | | TBitmap.RawImage.Data PaintBox | 102.5 | 9.8 | | |
| 38 | + | | TBitmap.RawImage.Data Move | 116 | 8.6 | | |
| 39 | + | | TBGRABitmap PaintBox | 123.1 | 8.1 | | |
| 40 | + | | TGR32Image | 68.5 | 14.6 | | |
| 41 | + | | OpenGL | 56.7 | 17.6 | | |
| 42 | + | | OpenGL PBO | 152.4 | 6.6 | | |
| 43 | + | | Dummy | 38166.3 | 0 | | |
| 44 | + | ||
| 45 | + | #### Test 1.2 | |
| 46 | + | ||
| 47 | + | **OS:** Ubuntu 12.10, GNU/Linux kernel 3.5.0 i686, Qt4 | |
| 48 | + | ||
| 49 | + | | Method | FPS | Frame duration \[ms\] | | |
| 50 | + | |--------------------------------------|-------|-----------------------| | |
| 51 | + | | TBitmap.Canvas.Pixels | 3.2 | 312.8 | | |
| 52 | + | | TBitmap.Canvas.Pixels Update locking | 4.3 | 232.3 | | |
| 53 | + | | TLazIntfImage.Colors copy | 80.1 | 12.5 | | |
| 54 | + | | TLazIntfImage.Colors no copy | 85.1 | 11.7 | | |
| 55 | + | | TBitmap.RawImage.Data | 223.4 | 4.5 | | |
| 56 | + | | TBitmap.RawImage.Data PaintBox | 225.9 | 4.4 | | |
| 57 | + | | TBitmap.RawImage.Data Move | 276.9 | 3.6 | | |
| 58 | + | | TBGRABitmap PaintBox | 112.5 | 8.9 | | |
| 59 | + | | Dummy | 489.6 | 2 | | |
| 60 | + | ||
| 61 | + | #### Test 1.3 | |
| 62 | + | ||
| 63 | + | **OS:** Windows 8 32-bit | |
| 64 | + | ||
| 65 | + | | Method | FPS | Frame duration \[ms\] | | |
| 66 | + | |--------------------------------------|--------|-----------------------| | |
| 67 | + | | TBitmap.Canvas.Pixels | 2,8 | 351 | | |
| 68 | + | | TBitmap.Canvas.Pixels Update locking | 9,6 | 103,9 | | |
| 69 | + | | TLazIntfImage.Colors copy | 93,6 | 10,7 | | |
| 70 | + | | TLazIntfImage.Colors no copy | 97,8 | 10,2 | | |
| 71 | + | | TBitmap.RawImage.Data | 258,2 | 3,9 | | |
| 72 | + | | TBitmap.RawImage.Data PaintBox | 256,6 | 3,9 | | |
| 73 | + | | TBitmap.RawImage.Data Move | 342,5 | 2,9 | | |
| 74 | + | | TBGRABitmap PaintBox | 428 | 2,3 | | |
| 75 | + | | TGR32Image | 464,8 | 2,2 | | |
| 76 | + | | OpenGL | 221,6 | 4,5 | | |
| 77 | + | | OpenGL PBO | 330,7 | 3 | | |
| 78 | + | | Dummy | 112824 | 0 | | |
| 79 | + | ||
| 80 | + | ### Test 3 | |
| 81 | + | ||
| 82 | + | **Hardware:** Intel Celeron CPU 2.66 GHz, 1.50 GB RAM, NVIDIA GeForce 6200. | |
| 83 | + | ||
| 84 | + | **OS:** Windows 7 x86. | |
| 85 | + | ||
| 86 | + | | Method | FPS | Duration | | |
| 87 | + | |--------------------------------------|------|----------| | |
| 88 | + | | TBitmap.Canvas.Pixels | 1.44 | 694.82 | | |
| 89 | + | | TBitmap.Canvas.Pixels Update locking | 7.81 | 128.07 | | |
| 90 | + | | TLazIntfImage.Colors copy | 96.6 | 10.35 | | |
| 91 | + | | TLazIntfImage.Colors no copy | 96.7 | 10.34 | | |
| 92 | + | | TBitmap.RawImage.Data | 462 | 2.16 | | |
| 93 | + | | TBitmap.RawImage.Data PaintBox | 482 | 2.07 | | |
| 94 | + | | TBGRABitmap PaintBox | 369 | 2.70 | | |
| 95 | + | | OpenGL | 60.2 | 16.61 | | |
| 96 | + | | OpenGL PBO | 60.1 | 16.63 | | |
| 97 | + | ||
| 98 | + | **Conclusion** the faster method (less duration in ms) with highest fps: | |
| 99 | + | ||
| 100 | + | 1\) Bitmap.RawImage.Data PaintBox | |
| 101 | + | ||
| 102 | + | 2\) TBitmap.RawImage.Data | |
| 103 | + | ||
| 104 | + | 3\) TBGRABitmap PaintBox | |
| 105 | + | ||
| 106 | + | ### Test 4 | |
| 107 | + | ||
| 108 | + | **Hardware:** AMD Sempron 1,6 GHz, 1 GB DDR, NVIDIA GeForce FX 5200 | |
| 109 | + | ||
| 110 | + | **OS:** Windows XP SP3 | |
| 111 | + | ||
| 112 | + | | Method | FPS | Frame duration \[ms\] | | |
| 113 | + | |--------------------------------------|-------|-----------------------| | |
| 114 | + | | TBitmap.Canvas.Pixels | 3,7 | 267,6 | | |
| 115 | + | | TBitmap.Canvas.Pixels Update locking | 12,7 | 78,6 | | |
| 116 | + | | TLazIntfImage.Colors copy | 76,2 | 13,1 | | |
| 117 | + | | TLazIntfImage.Colors no copy | 85,9 | 11,6 | | |
| 118 | + | | TBitmap.RawImage.Data | 205 | 4,9 | | |
| 119 | + | | TBitmap.RawImage.Data PaintBox | 295,3 | 3,4 | | |
| 120 | + | | TBitmap.RawImage.Data Move | 241,3 | 4,1 | | |
| 121 | + | | TBGRABitmap PaintBox | 343,7 | 2,9 | | |
| 122 | + | | TGR32Image | 320,8 | 3,1 | | |
| 123 | + | | OpenGL | 7,1 | 141,5 | | |
| 124 | + | | OpenGL PBO | 6,5 | 154,6 | | |
| 125 | + | | Dummy | 88110 | 0 | | |
| 126 | + | ||
| 127 | + | ### Test 5 | |
| 128 | + | ||
| 129 | + | **Conditions:** Intel Core 2 Duo 2,66 GHz; 2 GB DDR2, NVIDIA GeForce 8600 GT, Windows XP SP3 32-bit | |
| 130 | + | ||
| 131 | + | | Method | FPS | Frame duration \[ms\] | | |
| 132 | + | |--------------------------------------|----------|-----------------------| | |
| 133 | + | | TBitmap.Canvas.Pixels | 7,2 | 138,9 | | |
| 134 | + | | TBitmap.Canvas.Pixels Update locking | 28,4 | 35,2 | | |
| 135 | + | | TLazIntfImage.Colors copy | 183,4 | 5,5 | | |
| 136 | + | | TLazIntfImage.Colors no copy | 207,8 | 4,8 | | |
| 137 | + | | TBitmap.RawImage.Data | 680,8 | 1,5 | | |
| 138 | + | | TBitmap.RawImage.Data PaintBox | 1124,5 | 0,9 | | |
| 139 | + | | TBitmap.RawImage.Data Move | 781,6 | 1,3 | | |
| 140 | + | | TBGRABitmap PaintBox | 1093,2 | 0,9 | | |
| 141 | + | | TGR32Image | 1954,1 | 0,5 | | |
| 142 | + | | OpenGL | 963,3 | 1 | | |
| 143 | + | | OpenGL PBO | 1757,4 | 0,6 | | |
| 144 | + | | Dummy | 401069,4 | 0 | | |
| 145 | + | ||
| 146 | + | ### Test 6(20170503) | |
| 147 | + | ||
| 148 | + | **Conditions:** Intel Core i7-3630QM 2,40 GHz; 8 GB, Windows 8.1 64-bit | |
| 149 | + | ||
| 150 | + | | Method | FPS | Frame duration \[ms\] | | |
| 151 | + | |--------------------------------------|----------|-----------------------| | |
| 152 | + | | TBitmap.Canvas.Pixels | 1,8 | 544,8 | | |
| 153 | + | | TBitmap.Canvas.Pixels Update locking | 10,0 | 100,1 | | |
| 154 | + | | TLazIntfImage.Colors copy | 113,2 | 8,8 | | |
| 155 | + | | TLazIntfImage.Colors no copy | 131,8 | 7,6 | | |
| 156 | + | | TBitmap.RawImage.Data | 662,9 | 1,5 | | |
| 157 | + | | TBitmap.RawImage.Data PaintBox | 650,1 | 1,5 | | |
| 158 | + | | TBitmap.RawImage.Data Move | 1047,3 | 1,0 | | |
| 159 | + | | TBGRABitmap PaintBox | 640,9 | 1,6 | | |
| 160 | + | | OpenGL | 316,0 | 3.2 | | |
| 161 | + | | OpenGL PBO | 728,7 | 1,4 | | |
| 162 | + | | Dummy | 219514,5 | 0.005 | | |
| 163 | + | ||
| 164 | + | ## Download | |
| 165 | + | ||
| 166 | + | Application can be downloaded from svn repository: | |
| 167 | + | ||
| 168 | + | `svn checkout `[`http://svn.zdechov.net/PascalClassLibrary/GraphicTest/`](http://svn.zdechov.net/PascalClassLibrary/GraphicTest/) | |
| 169 | + | ||
| 170 | + | ## See also | |
| 171 | + | ||
| 172 | + | - [[Fast direct pixel access]] | |
| 173 | + | ||
| 174 | + | --- | |
| 175 | + | *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).* |
