Hi all, as promised, here are the patch files for MS Windows to use Device Independent Bimaps to speed up. This code is still a bit buggy, so you have been warned :-)
As always, patches are against stock 2.4.5. Add the compiler switch -DUSE_DIB to your makefile to activate the DIB patches.
* Changes: - In vdrivers/vd_win32.c: Forgot a call to GetObject() to map the bitmap into the process address space. - in fdrivers/fd_win32.c: Changed the access method from GDI Handles to bitmaps for BitBlt ram2video, video2ram and GetPixel().
Known Bugs: - GrWRITE and GrIMAGE are the same, the transparent color is ignored (TODO...) - There seems to be a small time window when the graphics window is not updated after it becomes visible. I noticed that once in speedtst, but was unable to reproduce that. Weird.
Here are some measurements with speedtst: On my Laptop, without the readpixel patch, graphics window partly obscured, so some of the blts are too fast to be realistic: Driver readp drawp line hline vline block v2v v2r r2v SVGA24 320x 240 0.21 0.06 0.40 0.36 0.33 61.92 7.56 56.74 9.38 SVGA24 640x 480 0.21 0.06 0.43 0.40 0.37 62.01 6.66 35.82 9.67 RAM24 320x 240 6.99 9.52 10.51 134.95 11.18 161.74 99.51 0.00 0.00 RAM24 640x 480 5.92 7.31 6.26 57.76 4.44 58.91 31.75 0.00 0.00
A real test, with readpixel patch: Graphics driver: "win32"
Driver readp drawp line hline vline block v2v v2r r2v SVGA24 640x 480 5.13 0.06 0.44 0.41 0.38 62.01 6.80 36.42 9.78 RAM24 640x 480 5.92 7.72 6.39 59.04 4.52 59.45 32.35 0.00 0.00
Same on my desktop. This one has a "natural" representation as 32-Bit Pixels, so some of the operations are actually slower.
Graphics driver: "win32"
Driver readp drawp line hline vline block v2v v2r r2v SVGA24 640x 480 3.93 0.10 2.02 8.97 2.72 94.39 1.16 75.10 27.64 RAM24 640x 480 4.91 3.97 7.84 122.14 4.97 105.13 71.22 0.00 0.00
On a sidenote: Is there a way to make the listserver ignore Outlook "Out-Of-Office Replies"? It is odd to (un)subscribe everytime I am on a trip, and I find these replies to lists stupid...
Anyway, here are the patches, feedback welcome.
<<grx20.pat.0128>> <<vd_win32.pat.0218>> <<fd_win32.pat.0218>>
Ciao Tom
Thomas Demmer Kraft Foods R&D Munich Phone: +49 89 62738-6302 Fax: +49 89 62738-86302
Thought of the Day: Certainly there are things in life that money can't buy, but it's very funny-- Did you ever try buying them without money? -- Ogden Nash