[Bug 6842] DrawFocusRect code correction

Wine Bugs wine-bugs at winehq.org
Thu Dec 7 21:06:04 CST 2006


http://bugs.winehq.org/show_bug.cgi?id=6842





------- Additional Comments From wine.severach at spamgourmet.com  2006-07-12 21:06 -------
>choose one method

The preprocessor lines aren't there for the computer, it's there for the
implementor of this patch. If they decide to do the extra work of caching, the
lines are shown that do the work. If not they drop the extra cache lines and
implement the simpler non caching method. The implementor may also choose to do
the work with internal GUI primitives to improve speed.

>Don't use C++-style comments

The comments are for the implementor of the patch not for the final Wine code.
They are to answer the questions that the implementor will have "Why didn't you
do it some other way?" Answer: I tried those other ways and found them to be
slower or less compatible.

>It would be easier to check your code if you sent it as a patch to wine-devel

I can't send it as a patch because I don't run Wine. It would be inappropriate
for me to submit code that I haven't tested under the target OS. This was all
developed in Windows where I have the real DrawFocusRect to compare behavior.

>We want to be able to see exactly what you've changed

That's easy. All the old code was thrown away and the new code is printed above.
The old code is sufficient only as a stop gap solution until someone takes the
time to produce the new code.

>How do you know it's more correct than our current implementation?

In Windows I have the real DrawFocusRect that I can draw on whatever test colors
I can dream up. I hack until my DrawFocusRect always produces the same result. A
quick read of the comments in Wine DrawFocusRect acknowledges that the current
way is wrong and PatBlt is the right way. I'm providing working PatBlt code.

>How do you know that it's faster?

The Windows project I built to produce the code has the necessary timing code to
demonstrate performance in Windows. Wine performance is likely to be similar.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list