GDI RestoreDC()

Mike Hearn m.hearn at signal.qinetiq.com
Thu Dec 5 08:51:35 CST 2002


Hi all,

I think I've traced the problem with the Adobe SVG plugin not reliably
rendering:

This is from a good run (when I use an svg file I know will render OK):

080746b8:Call kernel32.LOCAL_Free(0000019f,00001aca) ret=40948f6b
080746b8:Ret  kernel32.LOCAL_Free() retval=00000000 ret=40948f6b
trace:gdi:GDI_FreeObject (0x1aca): leave 1
080746b8:Ret  gdi32.DeleteObject() retval=00000001 ret=5300a17c
080746b8:Call
gdi32.BitBlt(000008a8,00000000,00000000,0000008c,0000008c,00000ba0,00000000,00000000,00cc0020) ret=5300a1ae

As you can see, it appears to perform the BitBlt call correctly, those
parameters look correct.

Here is the same section from a bad run:

080746b8:Call kernel32.LOCAL_Free(0000019f,00001ac2) ret=40948f6b
080746b8:Ret  kernel32.LOCAL_Free() retval=00000000 ret=40948f6b
trace:gdi:GDI_FreeObject (0x1ac2): leave 1
080746b8:Ret  gdi32.DeleteObject() retval=00000001 ret=5301b3df
080746b8:Call gdi32.RestoreDC(000008a8,ffffffff) ret=53018c68

It doesn't call BitBlt at all, not now, not later, not at all. Instead,
it calls RestoreDC for no apparently good reason. That last argument
looks highly suspicious, in that MSDN says it's an int which when
positive identifies a state and when negative identifies a "step", ie -1
would restore the last state from the stack.

I can't figure out what ffffffff would be as an int though :( Would it
be negative or positive? Either way, is this an intelligent sort of
value for the parameter to have? The MSDN docs are here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/devcons_3883.asp

I can't figure out why it would suddenly call RestoreDC and then
seemingly go off on a tangent (the traces match up until that point),
rather than do a BitBlt like it's supposed to. The SVG files vary only
in that the "good" one has some interactivity (but it's not triggered at
startup).

Does anybody have any ideas? I'm fresh out for today.
thanks -mike

-- 
Mike Hearn <m.hearn at signal.qinetiq.com>
QinetiQ - Malvern Technology Center




More information about the wine-devel mailing list