Commit Graph

26 Commits

Author SHA1 Message Date
rhinoduck 361d6b8e76 Simplify libwebp usage in nsWEBPDecoder 2018-07-25 06:58:52 +08:00
rhinoduck cf532575c1 Clean up in nsWEBPDecoder a bit
Remove unneeded headers; make use of the override keyword; rename one
variable to make its meaning clearer; trim a few stray trailing spaces.
2018-07-25 06:58:50 +08:00
rhinoduck 3683f6dc1c Fix invalidation rect in nsWEBPDecoder
The last argument to nsIntRect's constructor should be height, not y2.
2018-07-25 06:58:48 +08:00
rhinoduck eef7695088 Fix memory leak in nsWEBPDecoder
FinishInternal() won't get called if an error has been posted before,
so the libwebp cleanup calls need to be in a different place; like the
destructor.
2018-07-25 06:58:45 +08:00
rhinoduck 0f37da4f2f Fix posting order in nsWEBPDecoder
As per CheckProgressConsistency() in ProgressTracker.cpp, PostSize()
should come before PostHasTransparency().
2018-07-25 06:58:44 +08:00
rhinoduck e665e73cea Fix member visibility in nsWEBPDecoder 2018-07-25 06:58:42 +08:00
rhinoduck 2c9b1e3a23 Do not pre-multiply JXR planar alpha twice
If the image already had pre-multiplied alpha, the decoder would
pre-multiply those already pre-multiplied values again when decoding
the alpha plane separately from the main plane.
2018-07-25 06:58:17 +08:00
rhinoduck ea05403e84 Prettify rendering of JXR images with transparency
Prevent fully transparent areas from being black (or whatever the color
values there are) when rendering JXR images with planar alpha before all
data is available.
2018-07-25 06:57:41 +08:00
Pale Moon 132522bfc9 Change the way maximum image dimensions are handled for PNG.
Prev: Hard cap width = 32k OR height = 32k
New: Hard cap width = 64k OR height = 64k, and image area < 256 Mpix
This will allow decoding of larger images with "strip" aspect ratio (horizontally or vertically).
2018-07-25 06:52:47 +08:00
rhinoduck 5059bf8c04 Initialize member variable to stay safe 2018-07-25 06:45:58 +08:00
rhinoduck cdb87b65f4 Silence compiler warnings in JXR decoder
Until the MSOT version is rewritten.
2018-07-25 06:45:29 +08:00
rhinoduck 7b7ccd5dce Add JXR support to the browser
Can be enabled/disabled at runtime by toggling the 'media.jxr.enabled'
pref (disabled by default).

Two additional prefs are provided for testing purposes:
'media.jxr.autoaccept', and 'media.jxr.advertised_mime_type'
See comments in all.js for information on what these do.

This commit includes the MS OpenTech implementation of the decoder on
the browser side with some fixes applied; see the development in Pale
Moon GitGub issue #105 or my comments in the source code for more
information.
2018-07-25 06:44:47 +08:00
Pale Moon d67cb315e6 Fix build bustage caused by 25ca96965c594585ce11ee4c2f08e3ecb51284f9 2018-07-25 01:04:45 +08:00
Pale Moon e7a1f19b4c Be more strict with PNG files with CRC errors and invalid frame sizes if building with APNG support.
This follows the strong recommendation in the spec to reject these frames/files outright.
2018-07-25 01:04:37 +08:00
Gpower2 d8cdbde6ce Change WIN_VER and _WIN32_WINNT to 0x0600 2018-07-25 01:02:27 +08:00
Moonchild 2ef20e45fe Revert "Change WINVER and _WIN32_WINNT to 0x0600 where applicable for issue #515" 2018-07-25 01:02:18 +08:00
Gpower2 a06562e691 Change WIN_VER and _WIN32_WINNT to 0x0600 2018-07-25 00:58:05 +08:00
Pale Moon 5011f756e1 Properly support transparent WebP images with the new decoder implementation. 2018-07-25 00:57:38 +08:00
Pale Moon 1f39ab05ee Remove unnecessary frame allocations for WebP. 2018-07-25 00:57:35 +08:00
wolfbeast 97ff398f18 Get rid of non functional pointer juggling and replace it with a working data conversion.
This resolves #489.
2018-07-25 00:55:33 +08:00
wolfbeast 915a8f37a7 Use new type frame allocation.
Remove decoder-internal mImageData (let Decoder handle that!)
Decoding works now, but data transfer from mData to mImageData is still wrong.
2018-07-25 00:55:31 +08:00
wolfbeast b8cabbc735 Base import of Tycho-libwebp-work branch 2018-07-25 00:55:28 +08:00
wolfbeast 49eb1155d5 Better handle incorrect ICO images. 2018-07-24 23:31:15 +08:00
trav90 052e58f015 Remove GnomeVFS extension 2018-07-24 23:12:24 +08:00
wolfbeast 5ee6187aad Prep tree for forward-porting Goanna, stage 1 2018-07-24 23:10:50 +08:00
Moonchild baf46a6bf1 Merge pull request #1 from mozilla/esr38: Esr38 upstream pull 2018-07-24 23:04:07 +08:00