[PATCH] d3drm/tests: Add tests for IDirect3DRM*::LoadTexture (try 4).
Stefan Dösinger
stefandoesinger at gmail.com
Sat Dec 26 13:10:42 CST 2015
> Am 26.12.2015 um 19:51 schrieb Aaryaman Vasishta <jem456.vasishta at gmail.com>:
>
> Anything else before I send try 5? Hopefully that'll be the last one :)
I'm sitting in a crowded train with crappy internet access right now, so reviews are a bit tricky :-) .
Actually I noticed quite a lot on a second look:
> + info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BITMAPINFO));
I prefer sizeof(*info) instead of sizeof(BITMAPINFO) in this case, but it's mostly a matter of style.
> + WriteFile(file, (void *)info, size, &written, NULL);
A cast from / to void * is not necessary in C. (It's a C++ thingy).
You could add a few more checks for bpp and bytes_per_line in test_bitmap_data(). Most of those would be inside the format-specific paths.
> + ok(size != INVALID_FILE_SIZE, "Failed to get file size, error %d\n", GetLastError());
> + if (size == INVALID_FILE_SIZE)
> + goto cleanup;
This is another case where you can skip the ifs, if the branch is taken the test already failed anyway.
> + buffer2 = ((unsigned char *)buffer + bmp_header->bfOffBits);
The outer parenthesis are kinda redundant
>+ file = create_bitmap("8bpp.bmp", 100, 100, FALSE);
> ...
> + file = create_bitmap("24bpp.bmp", 100, 100, FALSE);
> ...
I don't think those two differ. I guess the first one should have palletized = TRUE
I hope that's all now, but I can't promise...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20151226/73df0561/attachment.sig>
More information about the wine-devel
mailing list