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