user32/tests: Added tests for DrawIcon and DrawIconEx (try 6)

Alexandre Julliard julliard at winehq.org
Thu Jun 18 03:43:48 CDT 2009


Joel Holdsworth <joel at airwebreathe.org.uk> writes:

> The most obvious solution would be something like this as a color test:
>
> const int screen_bpp = GetDeviceCaps(hdc, BITSPIXEL);
>
> ok (result == modern_expected ||          /* Windows 2000 and up */
>     broken(result == legacy_expected) ||  /* Windows NT 4.0, 9X and below */
>     broken((result & 0x00F8F8F8) == (legacy_expected & 0x00F8F8F8) &&
>         screen_bpp == 16) ||
>     broken(result != legacy_expected && screen_bpp <= 8),
>
> How acceptable would that be?

I don't think you need such a complex test, we don't really care about
the exact reason why it's broken. Also I think you should be using the
relaxed color matching everywhere, even for the working cases. We may
want to round things differently in Wine too, and there's no reason to
require exact pixel values, testing a few high bits should be enough to
determine that blending has taken place.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list