GraphicTest/ja: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 1 | ## 導入 | |
| 2 | 2 | ||
| 3 | 3 | GraphicTest は、様々な direct drawing methods (直接描画手法) によるFPSを計測するプログラムです。目的は、オフスクリーンでのカスタムビットマップを画面上の表示エリアにコピーする場合に、どの手法が最速かを決めるためです。 | |
| 4 | 4 | ||
| 5 | 5 | 後述するベンチマークの結果は、以下に依存します: | |
| 6 | 6 | ||
| 7 | 7 | - コンピューターのハードウェア | |
| 8 | 8 | - コンパイラの最適化オプションの有無 | |
| 9 | 9 | - OS | |
| 10 | 10 | - 使われている GUI ツールキット | |
| 11 | 11 | - VSYNC と FPS 上限 | |
| 12 | 12 | - ディスプレイの色深度 (デフォルトは 32-bit) | |
| 13 | 13 | - 計測に用いる画像の解像度 (デフォルトは 320x240) | |
| 14 | 14 | ||
| 15 | 15 | いくつかのプラットフォームでより良い、または、より悪い結果を求めるためには、描画手法における B(Blue)とR(Red)のコンポーネントを入れ替えることが必要になります。 | |
| 16 | 16 | ||
| 17 | 17 | ### Test 1 | |
| 18 | 18 | ||
| 19 | 19 | **Hardware:** AMD Turion X2 1,8 GHz, 2 GB RAM, HD2400 | |
| 20 | 20 | ||
| 21 | 21 | #### Test 1.1 | |
| 22 | 22 | ||
| 23 | 23 | **OS:** Ubuntu 12.10, GNU/Linux kernel 3.5.0 i686, Gtk2 | |
| 24 | 24 | ||
| 25 | 25 | | Method | FPS | Frame duration \[ms\] | | |
| 26 | 26 | |--------------------------------------|---------|-----------------------| | |
| 27 | 27 | | TBitmap.Canvas.Pixels | 1 | 1031.7 | | |
| 28 | 28 | | TBitmap.Canvas.Pixels Update locking | 3.2 | 308.1 | | |
| 29 | 29 | | TLazIntfImage.Colors copy | 54.3 | 18.4 | | |
| 30 | 30 | | TLazIntfImage.Colors no copy | 64.4 | 15.5 | | |
| 31 | 31 | | TBitmap.RawImage.Data | 102.2 | 9.8 | | |
| 32 | 32 | | TBitmap.RawImage.Data PaintBox | 102.5 | 9.8 | | |
| 33 | 33 | | TBitmap.RawImage.Data Move | 116 | 8.6 | | |
| 34 | 34 | | TBGRABitmap PaintBox | 123.1 | 8.1 | | |
| 35 | 35 | | TGR32Image | 68.5 | 14.6 | | |
| 36 | 36 | | OpenGL | 56.7 | 17.6 | | |
| 37 | 37 | | OpenGL PBO | 152.4 | 6.6 | | |
| 38 | 38 | | Dummy | 38166.3 | 0 | | |
| 39 | 39 | ||
| 40 | 40 | #### Test 1.2 | |
| 41 | 41 | ||
| 42 | 42 | **OS:** Ubuntu 12.10, GNU/Linux kernel 3.5.0 i686, Qt4 | |
| 43 | 43 | ||
| 44 | 44 | | Method | FPS | Frame duration \[ms\] | | |
| 45 | 45 | |--------------------------------------|-------|-----------------------| | |
| 46 | 46 | | TBitmap.Canvas.Pixels | 3.2 | 312.8 | | |
| 47 | 47 | | TBitmap.Canvas.Pixels Update locking | 4.3 | 232.3 | | |
| 48 | 48 | | TLazIntfImage.Colors copy | 80.1 | 12.5 | | |
| 49 | 49 | | TLazIntfImage.Colors no copy | 85.1 | 11.7 | | |
| 50 | 50 | | TBitmap.RawImage.Data | 223.4 | 4.5 | | |
| 51 | 51 | | TBitmap.RawImage.Data PaintBox | 225.9 | 4.4 | | |
| 52 | 52 | | TBitmap.RawImage.Data Move | 276.9 | 3.6 | | |
| 53 | 53 | | TBGRABitmap PaintBox | 112.5 | 8.9 | | |
| 54 | 54 | | Dummy | 489.6 | 2 | | |
| 55 | 55 | ||
| 56 | 56 | #### Test 1.3 | |
| 57 | 57 | ||
| 58 | 58 | **OS:** Windows 8 32-bit | |
| 59 | 59 | ||
| 60 | 60 | | Method | FPS | Frame duration \[ms\] | | |
| 61 | 61 | |--------------------------------------|--------|-----------------------| | |
| 62 | 62 | | TBitmap.Canvas.Pixels | 2,8 | 351 | | |
| 63 | 63 | | TBitmap.Canvas.Pixels Update locking | 9,6 | 103,9 | | |
| 64 | 64 | | TLazIntfImage.Colors copy | 93,6 | 10,7 | | |
| 65 | 65 | | TLazIntfImage.Colors no copy | 97,8 | 10,2 | | |
| 66 | 66 | | TBitmap.RawImage.Data | 258,2 | 3,9 | | |
| 67 | 67 | | TBitmap.RawImage.Data PaintBox | 256,6 | 3,9 | | |
| 68 | 68 | | TBitmap.RawImage.Data Move | 342,5 | 2,9 | | |
| 69 | 69 | | TBGRABitmap PaintBox | 428 | 2,3 | | |
| 70 | 70 | | TGR32Image | 464,8 | 2,2 | | |
| 71 | 71 | | OpenGL | 221,6 | 4,5 | | |
| 72 | 72 | | OpenGL PBO | 330,7 | 3 | | |
| 73 | 73 | | Dummy | 112824 | 0 | | |
| 74 | 74 | ||
| 75 | 75 | ### Test 3 | |
| 76 | 76 | ||
| 77 | 77 | **Hardware:** Intel Celeron CPU 2.66 GHz, 1.50 GB RAM, NVIDIA GeForce 6200. | |
| 78 | 78 | ||
| 79 | 79 | **OS:** Windows 7 x86. | |
| 80 | 80 | ||
| 81 | 81 | | Method | FPS | Duration | | |
| 82 | 82 | |--------------------------------------|------|----------| | |
| 83 | 83 | | TBitmap.Canvas.Pixels | 1.44 | 694.82 | | |
| 84 | 84 | | TBitmap.Canvas.Pixels Update locking | 7.81 | 128.07 | | |
| 85 | 85 | | TLazIntfImage.Colors copy | 96.6 | 10.35 | | |
| 86 | 86 | | TLazIntfImage.Colors no copy | 96.7 | 10.34 | | |
| 87 | 87 | | TBitmap.RawImage.Data | 462 | 2.16 | | |
| 88 | 88 | | TBitmap.RawImage.Data PaintBox | 482 | 2.07 | | |
| 89 | 89 | | TBGRABitmap PaintBox | 369 | 2.70 | | |
| 90 | 90 | | OpenGL | 60.2 | 16.61 | | |
| 91 | 91 | | OpenGL PBO | 60.1 | 16.63 | | |
| 92 | 92 | ||
| 93 | 93 | **Conclusion** the faster method (less duration in ms) with highest fps: | |
| 94 | 94 | ||
| 95 | 95 | 1\) Bitmap.RawImage.Data PaintBox | |
| 96 | 96 | ||
| 97 | 97 | 2\) TBitmap.RawImage.Data | |
| 98 | 98 | ||
| 99 | 99 | 3\) TBGRABitmap PaintBox | |
| 100 | 100 | ||
| 101 | 101 | ### Test 4 | |
| 102 | 102 | ||
| 103 | 103 | **Hardware:** AMD Sempron 1,6 GHz, 1 GB DDR, NVIDIA GeForce FX 5200 | |
| 104 | 104 | ||
| 105 | 105 | **OS:** Windows XP SP3 | |
| 106 | 106 | ||
| 107 | 107 | | Method | FPS | Frame duration \[ms\] | | |
| 108 | 108 | |--------------------------------------|-------|-----------------------| | |
| 109 | 109 | | TBitmap.Canvas.Pixels | 3,7 | 267,6 | | |
| 110 | 110 | | TBitmap.Canvas.Pixels Update locking | 12,7 | 78,6 | | |
| 111 | 111 | | TLazIntfImage.Colors copy | 76,2 | 13,1 | | |
| 112 | 112 | | TLazIntfImage.Colors no copy | 85,9 | 11,6 | | |
| 113 | 113 | | TBitmap.RawImage.Data | 205 | 4,9 | | |
| 114 | 114 | | TBitmap.RawImage.Data PaintBox | 295,3 | 3,4 | | |
| 115 | 115 | | TBitmap.RawImage.Data Move | 241,3 | 4,1 | | |
| 116 | 116 | | TBGRABitmap PaintBox | 343,7 | 2,9 | | |
| 117 | 117 | | TGR32Image | 320,8 | 3,1 | | |
| 118 | 118 | | OpenGL | 7,1 | 141,5 | | |
| 119 | 119 | | OpenGL PBO | 6,5 | 154,6 | | |
| 120 | 120 | | Dummy | 88110 | 0 | | |
| 121 | 121 | ||
| 122 | 122 | ### Test 5 | |
| 123 | 123 | ||
| 124 | 124 | **Conditions:** Intel Core 2 Duo 2,66 GHz; 2 GB DDR2, NVIDIA GeForce 8600 GT, Windows XP SP3 32-bit | |
| 125 | 125 | ||
| 126 | 126 | | Method | FPS | Frame duration \[ms\] | | |
| 127 | 127 | |--------------------------------------|----------|-----------------------| | |
| 128 | 128 | | TBitmap.Canvas.Pixels | 7,2 | 138,9 | | |
| 129 | 129 | | TBitmap.Canvas.Pixels Update locking | 28,4 | 35,2 | | |
| 130 | 130 | | TLazIntfImage.Colors copy | 183,4 | 5,5 | | |
| 131 | 131 | | TLazIntfImage.Colors no copy | 207,8 | 4,8 | | |
| 132 | 132 | | TBitmap.RawImage.Data | 680,8 | 1,5 | | |
| 133 | 133 | | TBitmap.RawImage.Data PaintBox | 1124,5 | 0,9 | | |
| 134 | 134 | | TBitmap.RawImage.Data Move | 781,6 | 1,3 | | |
| 135 | 135 | | TBGRABitmap PaintBox | 1093,2 | 0,9 | | |
| 136 | 136 | | TGR32Image | 1954,1 | 0,5 | | |
| 137 | 137 | | OpenGL | 963,3 | 1 | | |
| 138 | 138 | | OpenGL PBO | 1757,4 | 0,6 | | |
| 139 | 139 | | Dummy | 401069,4 | 0 | | |
| 140 | 140 | ||
| 141 | 141 | ### Test 6(20170503: 訳者の結果です。) | |
| 142 | 142 | ||
| 143 | 143 | **Conditions:** Intel Core i7-3630QM 2,40 GHz; 8 GB, Windows 8.1 64-bit | |
| 144 | 144 | ||
| 145 | 145 | | Method | FPS | Frame duration \[ms\] | | |
| 146 | 146 | |--------------------------------------|----------|-----------------------| | |
| 147 | 147 | | TBitmap.Canvas.Pixels | 1,8 | 544,8 | | |
| 148 | 148 | | TBitmap.Canvas.Pixels Update locking | 10,0 | 100,1 | | |
| 149 | 149 | | TLazIntfImage.Colors copy | 113,2 | 8,8 | | |
| 150 | 150 | | TLazIntfImage.Colors no copy | 131,8 | 7,6 | | |
| 151 | 151 | | TBitmap.RawImage.Data | 662,9 | 1,5 | | |
| 152 | 152 | | TBitmap.RawImage.Data PaintBox | 650,1 | 1,5 | | |
| 153 | 153 | | TBitmap.RawImage.Data Move | 1047,3 | 1,0 | | |
| 154 | 154 | | TBGRABitmap PaintBox | 640,9 | 1,6 | | |
| 155 | 155 | | OpenGL | 316,0 | 3.2 | | |
| 156 | 156 | | OpenGL PBO | 728,7 | 1,4 | | |
| 157 | 157 | | Dummy | 219514,5 | 0.005 | | |
| 158 | 158 | ||
| 159 | 159 | ## ダウンロード | |
| 160 | 160 | ||
| 161 | 161 | プログラムは、以下の svn リポジトリからダウンロードできます。 | |
| 162 | 162 | ||
| 163 | - | ||
| 163 | + | ```text | |
| 164 | + | svn checkout http://svn.zdechov.net/svn/PascalClassLibrary/GraphicTest/ | |
| 165 | + | ``` | |
| 164 | 166 | ||
| 165 | 167 | ## 関連情報 | |
| 166 | 168 | ||
| 167 | 169 | - [[Fast direct pixel access/ja]] | |
| 168 | 170 | ||
| 169 | 171 | --- | |
| 170 | 172 | *From the Free Pascal wiki, page "GraphicTest/ja", as it stood on 2017-05-04 after a change by Miyatakejiro, 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).* | |
| 171 | 173 | Category: Example programs/ja | |
| 172 | 174 | Category: Graphics/ja |
