Closed Bug 1215156 Opened 4 years ago Closed 4 years ago

move SetPixel* functions into nsBMPDecoder.cpp

Categories

(Core :: ImageLib, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

These functions are only used in nsBMPDecoder.cpp; we don't need them
anywhere else.  The only other place they might get used would be the
BMP encoder, but the encoder appears to have its own routines for
setting pixel data, which don't overlap very well with the decoder's.
Comment on attachment 8674306 [details] [diff] [review]
move SetPixel* functions into nsBMPDecoder.cpp

Review of attachment 8674306 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thanks!

::: image/decoders/nsBMPDecoder.cpp
@@ +122,5 @@
>  
> +/// Sets the pixel data in aDecoded to the given values.
> +/// @param aDecoded pointer to pixel to be set, will be incremented to point to
> +/// the next pixel.
> +static inline void

As long as we're at it, let's get rid of |inline| here since it's useless.

@@ +129,5 @@
> +{
> +  *aDecoded++ = gfxPackedPixel(aAlpha, aRed, aGreen, aBlue);
> +}
> +
> +static inline void

Same here.

@@ +141,5 @@
> +/// @param aDecoded where the data is stored. Will be moved 4 resp 8 bytes
> +/// depending on whether one or two pixels are written.
> +/// @param aData The values for the two pixels
> +/// @param aCount Current count. Is decremented by one or two.
> +static inline void

And here.
Attachment #8674306 - Flags: review?(seth) → review+
https://hg.mozilla.org/mozilla-central/rev/ffef339aaa4f
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.