[PATCH] d3drm/tests: Add tests for IDirect3DRM*::LoadTexture.
Aaryaman Vasishta
jem456.vasishta at gmail.com
Wed Dec 16 12:06:16 CST 2015
On Wed, Dec 16, 2015 at 3:00 AM, Stefan Dösinger <stefandoesinger at gmail.com>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Hi,
>
> Cool to see that you're still working on this :-) .
>
> Am 2015-12-15 um 16:41 schrieb Aaryaman Vasishta:
>
> > + * Copyright 2015 Aaryaman Vasishta
> I think you can make this 2014-2015.
>
> > +static char *create_testbitmap(const char *filename, LPCSTR resource)
> LPCSTR -> const char * is better IMO.
> > +{
> > + static char path[MAX_PATH];
> > + DWORD written;
> > + HANDLE file;
> > + HRSRC res;
> > + void *ptr;
> > +
> > + GetTempPathA(sizeof(path)/sizeof(WCHAR), path);
> Why sizeof(WCHAR)?
>
Copy-paste mistake. Should be char. I had taken this function from the
dwrite font tests and slightly modified it, using char instead of wchar.
> > + if (img->palette)
> > + {
> > + if (depth == 8)
> > + {
> > + for (i = 0; i < size; i++)
> > + {
> > + if (buffer1[i] != buffer2[i])
> > + return FALSE;
> > + }
> > + }
> > + else
> > + {
> > + /* d3drm aligns the 24bpp texture to 4 bytes in the buffer,
> with one bype padding from 24bpp texture. */
> > + /* The image is palettized if the total number of colors
> used is < 256. */
> Does this ever happen? A palettized image with != 8 bpp?
>
It does palettize an image with <= 256 colors. I should actually change
that comment to <= instead of <.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20151216/74387604/attachment.html>
More information about the wine-devel
mailing list