author | Alfred Kayser <alfredkayser@gmail.com> |
Sat, 04 May 2013 13:42:26 +0200 | |
changeset 130835 | 04abf5e608f1822a17638a3603b2f685d2352fb3 |
parent 130834 | a546ce4ccb14ac4117bf3492f54cf6d55aa43f44 |
child 130836 | e1fac3f4bd838dc3300360492e7a06fb703229c2 |
push id | 24634 |
push user | philringnalda@gmail.com |
push date | Sat, 04 May 2013 21:00:23 +0000 |
treeherder | mozilla-central@7ef3c04c7533 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | joe |
bugs | 685471 |
milestone | 23.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
image/decoders/nsPNGDecoder.cpp | file | annotate | diff | comparison | revisions | |
image/decoders/nsPNGDecoder.h | file | annotate | diff | comparison | revisions |
--- a/image/decoders/nsPNGDecoder.cpp +++ b/image/decoders/nsPNGDecoder.cpp @@ -282,17 +282,17 @@ nsPNGDecoder::WriteInternal(const char * // If we only want width/height, we don't need to go through libpng if (IsSizeDecode()) { // Are we done? if (mHeaderBytesRead == BYTES_NEEDED_FOR_DIMENSIONS) return; // Scan the header for the width and height bytes - PRUint32 pos = 0; + uint32_t pos = 0; const uint8_t *bptr = (uint8_t *)aBuffer; while (pos < aCount && mHeaderBytesRead < BYTES_NEEDED_FOR_DIMENSIONS) { // Verify the signature bytes if (mHeaderBytesRead < sizeof(pngSignatureBytes)) { if (bptr[pos] != nsPNGDecoder::pngSignatureBytes[mHeaderBytesRead]) { PostDataError(); return; @@ -307,18 +307,18 @@ nsPNGDecoder::WriteInternal(const char * pos ++; mHeaderBytesRead ++; } // If we're done now, verify the data and set up the container if (mHeaderBytesRead == BYTES_NEEDED_FOR_DIMENSIONS) { // Grab the width and height, accounting for endianness (thanks libpng!) - PRUint32 width = png_get_uint_32(mSizeBytes); - PRUint32 height = png_get_uint_32(mSizeBytes + 4); + uint32_t width = png_get_uint_32(mSizeBytes); + uint32_t height = png_get_uint_32(mSizeBytes + 4); // Too big? if ((width > MOZ_PNG_MAX_DIMENSION) || (height > MOZ_PNG_MAX_DIMENSION)) { PostDataError(); return; } // Post our size to the superclass
--- a/image/decoders/nsPNGDecoder.h +++ b/image/decoders/nsPNGDecoder.h @@ -74,18 +74,18 @@ public: uint8_t *mCMSLine; uint8_t *interlacebuf; qcms_profile *mInProfile; qcms_transform *mTransform; gfxASurface::gfxImageFormat format; // For size decodes - PRUint8 mSizeBytes[8]; // Space for width and height, both 4 bytes - PRUint32 mHeaderBytesRead; + uint8_t mSizeBytes[8]; // Space for width and height, both 4 bytes + uint32_t mHeaderBytesRead; // whether CMS or premultiplied alpha are forced off uint32_t mCMSMode; uint8_t mChannels; bool mFrameHasNoAlpha; bool mFrameIsHidden; bool mDisablePremultipliedAlpha;