DIB Engine - Mostly fixed against test suite

Massimo Del Fedele max at veneto.com
Thu May 21 08:14:40 CDT 2009


Giuseppe Bilotta ha scritto:

> 
> I've started testing your patches (btw, the 9th patch in your series
> is missing the 0009- prefix although the 'series' file claims it
> should have; 

ops.... that was the hurry. stgit don't put the prefix, I added it manually
just for who don't want to use it

also, it's a real pity that git am doesn't accept stgit
> patches 8-/ but anyway, that's off topic).

well, never used git-am, but I feel quite comfortable with stgit... also
because it make easy to correct or integrate a commit
> 
> An application that you might want to test your DIB engine against is
> Opera. Although there IS an Opera for Linux, the 64-bit Flash plugin
> has some subtle network bugs, and there is no Shockwave plugin at all,
> so it is still necessary for me to use Opera for Windows under Wine in
> a few cases.

that's interesting.... I'll do it in short :-)
> 
> Opera is a good test for your DIB engine because
>   (1) it has problems with the current GDI32 stuff
>   (2) it crashes with your DIB engine ;-)

uhmmmmm.... see later, I'm afraid you didn't use the last posted engine...
> 
> There is currently a bug that makes the 'native' skin for Opera hard
> to use because many widgets fail to display properly (invisible or
> totally black: http://bugs.winehq.org/show_bug.cgi?id=18553 ). Also
> the rendering of some Flash stuff is considerably buggy.
> 
quite interesting and a good testfield.
As I'm restructurating a bit the code to solve the last 2 non conformity
on testsuite, I guess I'll check it shortly :-)

> I was hoping to test Opera with your DIB engine to see if it works,
> and I came across this crash as soon as I tried rendering a webpage:
> 
> =>0 0x7ee242c0 _CheckNotSysLevel+0x40(lock=0x7eaf8780) [/sources/wine/dlls/kernel32/../../include/winternl.h:1976] in kernel32 (0x0032e820)
>   1 0x7eac7020 GDI_CheckNotLock+0x20() [/sources/wine/dlls/gdi32/gdiobj.c:743] in gdi32 (0x0032e830)
>   2 0x7ea9c7f9 CreateCompatibleDC+0x19(hdc=(nil)) [/sources/wine/dlls/gdi32/dc.c:749] in gdi32 (0x0032e870)
>   3 0x7e8c4b2c _DIBDRVBITMAP_InitFromHBITMAP+0x24c(bmp=0x32e9b4, hbmp=<register EDI not in topmost frame>, copyPixels=0) [/sources/wine/dlls/winedib.drv/dibdrvbitmap.c:421] in winedib (0x0032e910)
>   4 0x7e8c257d DIBDRV_SetDIBits+0x1ed(physDev=0x19f478, hbitmap=<register EDI not in topmost frame>, startscan=<register ESI not in topmost frame>, lines=7, bits=0x67f97100, info=0x180528, coloruse=0) [/sources/wine/dlls/winedib.drv/dib.c:385] in winedib (0x0032ea60)
>   5 0x7ea9ec54 SetDIBits+0xf4(hdc=0x6138, hbitmap=0x6148, startscan=0, lines=7, bits=0x67f97100, info=0x180528, coloruse=0) [/sources/wine/dlls/gdi32/dib.c:361] in gdi32 (0x0032eaa0)
>   6 0x7eaa05a3 StretchDIBits+0x233(hdc=0x6124, xDst=0, yDst=0, widthDst=7, heightDst=7, xSrc=0, ySrc=0, widthSrc=7, heightSrc=7, bits=0x67f97100, info=<register EDI not in topmost frame>, wUsage=0, dwRop=13369376) [/sources/wine/dlls/gdi32/dib.c:295] in gdi32 (0x0032eb20)
>   7 0x7eb5255b LoadImageW+0x88b(hinst=0x67830000, name=0x67f637f0, type=0, desiredx=7, desiredy=7, loadflags=8193) [/sources/wine/dlls/user32/cursoricon.c:2471] in user32 (0x0032ec40)
>   8 0x67b60b57 in opera (+0x330b57) (0x0032ecc4)

That's the problem I'm solving with restructuration.
In short, using GetDIBits and SetDIBits with a DIB bitmap instead a DDB (as I believed was the only usage for it....)
I ran into problem of getting DIB color table. GetDIBColorTable() is useless because it needs the bimpap to be selected
on a DC, which is the opposite requirement for Get/SetDIBits; I can't create a temporary DC from inside them because
of the SysLevel error you ran into. I obviously can't also use GedDIBits to get the color table (!).... So I removed for
the moment DIB handling from both function, and I'm coding the true solution, which is somehow complicated but almost done.

In short, if you're interested, the solution is to keep a linked list of HBITMAP <--> Physical bitmap for all DIBs, which allow
accessing color table and other useful stuffs without resorting to GDI, which should be faster and less problem-prone.
I'll post the code in few days.
For then, I guess ALL non-conformities to test suite will be solved.

Ciao

Max




More information about the wine-devel mailing list