[PATCH 2/2] wincodecs/tests: Test headers written by BMP encoder

Dmitry Timoshkov dmitry at baikal.ru
Mon Mar 12 10:41:20 CDT 2018


Nikolay Sivov <nsivov at codeweavers.com> wrote:

> -static void check_bitmap_format(IStream *stream, const CLSID *encoder, const WICPixelFormatGUID *format)
> +static void check_bitmap_format(IStream *stream, const CLSID *encoder, const struct bitmap_data *dst)
>  {
>      HRESULT hr;
>      LARGE_INTEGER pos;
> @@ -732,11 +783,11 @@ static void check_bitmap_format(IStream *stream, const CLSID *encoder, const WIC
>      ok(hr == S_OK, "IStream_Seek error %#x\n", hr);
>  
>      if (IsEqualGUID(encoder, &CLSID_WICPngEncoder))
> -        check_png_format(stream, format);
> +        check_png_format(stream, dst->format);
>      else if (IsEqualGUID(encoder, &CLSID_WICBmpEncoder))
> -        check_bmp_format(stream, format);
> +        check_bmp_format(stream, dst);
>      else if (IsEqualGUID(encoder, &CLSID_WICTiffEncoder))
> -        check_tiff_format(stream, format);
> +        check_tiff_format(stream, dst->format);
>      else
>          ok(0, "unknown encoder %s\n", wine_dbgstr_guid(encoder));

It's commendable that you are trying to not copy and paste the patches
from wine-staging, however you are intentionally breaking an original idea
to make check_png_format/check_bmp_format/etc. helpers test only format
related things (like a header) and leave everything else (pixel data and
palette) to be hanlded by common code. That's unacceptable.

-- 
Dmitry.



More information about the wine-devel mailing list