[Webkit-unassigned] [Bug 42071] [WINCE] Add additonal methodes to BitmapInfo

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 22 13:41:44 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=42071


Adam Roben (aroben) <aroben at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #61211|review?, commit-queue?      |review-
               Flag|                            |




--- Comment #2 from Adam Roben (aroben) <aroben at apple.com>  2010-07-22 13:41:45 PST ---
(From update of attachment 61211)
> +        [WINCE] Add additonal methodes to BitmapInfo.

Typo: methodes

> -BitmapInfo bitmapInfoForSize(int width, int height)
> +BitmapInfo bitmapInfoForSize(int width, int height, WORD bitCount)
>  {
> +    ASSERT(bitCount == 16 || bitCount == 32);

ASSERT_ARG would be a bit better here:

ASSERT_ARG(bitCount, bitCount == 16 || bitCount == 32);

>      BitmapInfo bitmapInfo;
> -    bitmapInfo.bmiHeader.biSize          = sizeof(BITMAPINFOHEADER);

Perhaps the ChangeLog should mention that the BitmapInfo constructor does this for us. I was confused by this change at first.

> +#if !OS(WINCE) || PLATFORM(QT) || IMAGE_NO_ALPHA_USE_RGB555

Where/in what situations is IMAGE_NO_ALPHA_USE_RGB555 defined?

> +    if (bitCount == 16) {
> +        ((DWORD*)bitmapInfo.bmiColors)[0] = 0x0000F800;
> +        ((DWORD*)bitmapInfo.bmiColors)[1] = 0x000007E0;
> +        ((DWORD*)bitmapInfo.bmiColors)[2] = 0x0000001F;
> +    }
> +#endif

Where do these constants come from?

reinterpret_cast would be better here.

The changes look fine other than the cast, though I am interested in your answers to these questions.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list