Граф коммитов

122 Коммитов

Автор SHA1 Сообщение Дата
Timothy Nikkel 8b504c2676 Bug 1724331. Enable libpng defines PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED and PNG_WRITE_FILTER_SUPPORTED. r=aosmond
Other than compiler a bit more code this should have no functional effect, we're setting the values to their default values we had before.

Differential Revision: https://phabricator.services.mozilla.com/D130021
2021-11-05 08:53:26 +00:00
Timothy Nikkel 77d318b7de Bug 1737038. Make sure we pass the correct zlib strategy to zlib from libpng when encoding pngs. r=aosmond
We don't enable PNG_WRITE_FILTER_SUPPORTED that means that do_filter field on the png_struct will always be zero (it's initialized to 0, and any calls to png_set_filter will error out unless the result is setting it to 0 https://searchfox.org/mozilla-central/rev/489e82dcc1e5afbe691ff3b1c982382914637e38/media/libpng/pngwrite.c#1032 ).

Then this code in png_write_IHDR https://searchfox.org/mozilla-central/rev/489e82dcc1e5afbe691ff3b1c982382914637e38/media/libpng/pngwutil.c#829 will execute and set do_filter to PNG_ALL_FILTERS for non-paletted images with >=8 bit depth.

This this code https://searchfox.org/mozilla-central/rev/489e82dcc1e5afbe691ff3b1c982382914637e38/media/libpng/pngwutil.c#339 will execute and set our zlib strategy to PNG_Z_DEFAULT_STRATEGY (as opposed to PNG_Z_DEFAULT_NOFILTER_STRATEGY). PNG_Z_DEFAULT_STRATEGY is also known as Z_FILTERED inside of zlib.

From here https://searchfox.org/mozilla-central/rev/489e82dcc1e5afbe691ff3b1c982382914637e38/modules/zlib/src/zlib.h#589 that means: "Z_FILTERED for data produced by a filter (or predictor) ... Filtered data consists mostly of small values with a somewhat random distribution."

So that is not what we want to our non-filtered image data.

Switching this so that we use PNG_Z_DEFAULT_NOFILTER_STRATEGY improves both the compression and speed. The following is the avg time taken for toDataURL with a canvas containing 3 different images, and dataURL.length.

Z_FILTERED

very simple line art
49.7ms
17618

"very png compressable image from bug 1724331"
60.8ms
192214

a photo
241.3ms
4193966

Z_DEFAULT_STRATEGY

very simple line art
52.2ms
17590

"very png compressable image from bug 1724331"
61.2ms
186182

a photo
213ms
3555170

All images are smaller with Z_DEFAULT_STRATEGY, the photo being 15% smaller. The two compressable images are perhaps very slightly slower, but the large photo is 12% faster.

For bug 1724331 I want to turn on PNG_WRITE_FILTER_SUPPORTED, and this means we avoid this bug because do_filter gets set to PNG_FILTER_NONE which is not equal to PNG_NO_FILTERS (which is a bit confusing). Avoiding his bug means our png encoder produces different output and we have a couple of tests that check against the exact output of the pngencoder that need to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D130019
2021-11-04 00:17:07 +00:00
Mike Hommey 5245f8491f Bug 1733545 - Remove REQUIRES_UNIFIED_BUILD from third-party directories that don't need it. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D127229
2021-10-01 09:01:27 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Ryan VanderMeulen d0e822058f Bug 1513236 - Update libpng to version 1.6.37. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D15239

--HG--
extra : moz-landing-system : lando
2019-04-23 22:04:35 +00:00
Ryan VanderMeulen 0ae7b79a49 Bug 1542829 - Backport an upstream libpng patch. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D26575

--HG--
extra : moz-landing-system : lando
2019-04-08 19:00:31 +00:00
Makoto Kato 542b27743e Bug 1516605 - Turn on NEON on aarch64 when using gcc or clang. r=aosmond
libpng has NEON support using intrinsics, not assembler, so we should use it
even if aarch64.

MSVC build still turns off NEON since libpng doesn't support it on stable
version although upstream has it.

Differential Revision: https://phabricator.services.mozilla.com/D15462

--HG--
extra : moz-landing-system : lando
2019-01-02 14:11:31 +00:00
byron jones e26ef89bc9 Bug 1509867 - add moz.yaml to libpng, r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D12901

--HG--
extra : moz-landing-system : lando
2018-11-26 14:32:38 +00:00
Ryan VanderMeulen f53c113d39 Bug 1491467 - Update libpng to 1.6.35. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D5913

--HG--
extra : moz-landing-system : lando
2018-09-18 18:33:11 +00:00
Mike Hommey 75a6124d43 Bug 1469790 - Build for NEON by default when targetting Android arm. r=nalexander
The media/libpng/moz.build file overrides the C standard used via
-std=c89, per bug 1371266, which conflicts with the use of the
arm_neon.h header: compilation fails on the inline keyword, which didn't
exist in C89. We thus "bump" to the GNU89 standard, which is C89+GNU
extensions, including inline.

--HG--
extra : rebase_source : fe93a13e3bef8888e1874d2e94a6d8ef396aaf83
2018-06-27 08:07:27 +09:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Chris Manchester c86173526a Bug 1403346 - Replace all uses of ALLOW_COMPILER_WARNINGS with a template, remove ALLOW_COMPILER_WARNINGS. r=glandium
MozReview-Commit-ID: 1G2o4fy74cf
2017-10-25 15:12:09 -07:00
Glenn Randers-Pehrson 16b91208a6 Bug 1402057 - Update in-tree libpng to version 1.6.34. r=jrmuizel 2017-09-30 16:53:00 -04:00
Glenn Randers-Pehrson 8e5226d344 Bug 1377118 - Update in-tree libpng to version 1.6.31. r=jrmuizel
--HG--
extra : rebase_source : 72613717bc7380d217f64ea6ae1191563bdedf4a
2017-07-27 11:42:00 -04:00
Nicholas Nethercote ac3e6bddb4 Bug 1382099 - Remove MOZ_WIDGET_GONK from media/, uriloader/, widget, /xpfe/. r=snorp.
--HG--
extra : rebase_source : 75fe5b8320d52c7316ca547f706b64f30250d28c
2017-07-24 10:08:55 +10:00
Petr Sumbera 479e4d175f Bug 1371266 - libpng should be built with -std=c89. r=glennrp 2017-06-08 06:29:03 -07:00
Glenn Randers-Pehrson cec136b369 Bug 1368407 - Check for too-large PNG width. r=tn
--HG--
extra : source : 76404bf85ef79bacff8fd82b364698af17275d6b
2017-06-03 14:37:00 -04:00
Ryan VanderMeulen f6491af56c Backed out changeset 76404bf85ef7 for landing with the wrong bug number in the commit message. 2017-06-07 22:43:58 -04:00
Glenn Randers-Pehrson a20fe96562 Bug 1367496 - Check for too-large PNG width. r=tn
--HG--
extra : rebase_source : 0c4a6e639e803bceff110cab600aadb3779a79fe
2017-06-03 14:37:00 -04:00
Bruce Sun 04ae73ea81 Bug 1358023: (1/2) Refactor the dependency between libpng and freetype2; f=jfkthame, r=glandium
This refactor is for exposing necessary symbols of libpng for freetype2 in a
general way. Currently the necessary symbols of libpng for freetype2 are
exposed only on Android. And whether these symbols are exposed solely depends
on the target platform checking. A better way to decide whether or not to
expose these symbols would be checking the dependency of freetype2 directly.
2017-05-22 12:00:33 +08:00
Glenn Randers-Pehrson dbfdd899bc Bug 1348356 - Update in-tree libpng to version 1.6.29. r=jrmuizel 2017-03-18 10:33:00 -04:00
Joel Maher 43d997b5a3 Bug 1344470 - add BUG_COMPONENT to media/* files. r=padenot
MozReview-Commit-ID: C7xWOE0OwIK
2017-03-07 13:06:45 -05:00
Glenn Randers-Pehrson ddfeca8d24 Bug 1328354 - Update in-tree libpng to version 1.6.28. r=jrmuizel
--HG--
extra : rebase_source : 6bfeb3fb5840857dc3a71cbdbde570edafa78051
2017-01-07 09:32:00 -05:00
Glenn Randers-Pehrson 85a5a84ad0 Bug 1326234 - Update in-tree libpng to version 1.6.27. r=jrmuizel 2016-12-30 07:33:00 -05:00
Andrew Osmond f944648035 Bug 1315863 - Use PNG_MAXIMUM_INFLATE_WINDOW to ensure maximum compatibility with existing images. r=glennrp 2016-11-16 15:21:33 -05:00
Glenn Randers-Pehrson 632f7ac5b5 Bug 1311776 - Update in-tree libpng to version 1.6.26. r=jrmuizel 2016-10-20 15:10:00 -04:00
Glenn Randers-Pehrson e683cf2031 Bug 1299590 - Update in-tree libpng to version 1.6.25. r=tn
--HG--
extra : rebase_source : 1887acea914d4c63927ecb5de4867f8b7968492d
2016-09-07 13:30:00 -04:00
Glenn Randers-Pehrson 54a06def18 Bug 1296946 - Move enabling ARM-NEON PNG from old-configure.in to libpng/moz.build. r=jrmuizel
DONTBUILD

--HG--
extra : source : 7785b40af14f91910ad30c731212e5bdbb50bb09
2016-08-24 15:44:00 -04:00
Ryan VanderMeulen fef63c9543 Backed out changeset 7785b40af14f for landing with the wrong bug number in the commit message. 2016-08-25 21:45:15 -04:00
Glenn Randers-Pehrson 85000b8d09 Bug 1295671 - Move enabling ARM-NEON PNG from old-configure.in to libpng/moz.build. r=jrmuizel
--HG--
extra : rebase_source : c4f10bd0eb20bfe7420016d02d6b2254dcbbccf1
2016-08-24 15:44:00 -04:00
Glenn Randers-Pehrson dc0ab41166 Bug 1288588 - Exit on bad CRC in fcTL or fdAT chunk in an APNG file. r=jrmuizel 2016-08-12 21:31:31 -04:00
Glenn Randers-Pehrson f072d9f55e Bug 1276127 - Add SSE support to in-tree libpng. r=jrmuizel 2016-08-11 09:50:00 -04:00
Glenn Randers-Pehrson 2a7cababba Bug 1291986 - Part 01 (libpng) Update embedded libpng to version 1.6.24. r=seth 2016-08-04 20:10:00 +02:00
Glenn Randers-Pehrson fe2ffde0f8 Bug 1283961 - Part 1: Remove limits on PNG image dimensions (libpng). r=seth
--HG--
extra : rebase_source : 400ad744e14fbecd9b1aac784124df4c86078dbe
2016-07-21 11:13:00 -04:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Glenn Randers-Pehrson 885a243e81 Bug 1275901 - Update in-tree libpng to version 1.6.23. r=seth 2016-06-09 12:05:00 -04:00
Glenn Randers-Pehrson 95cc84e607 Bug 1230757 - Update in-tree libpng to version 1.6.21. r=seth
--HG--
extra : rebase_source : a3385a5b90d364900095f037355141f342e43c49
2016-01-16 09:27:00 -05:00
Nicholas Nethercote 57bef6b196 Bug 1232219 (part 3) - Fix remaining -Wunused warnings. r=glandium.
--HG--
extra : rebase_source : 357474b4c7729b78a3030dfefd720aad4e1b2576
2015-12-16 22:57:51 -08:00
Glenn Randers-Pehrson 60a6d95d13 Bug 1224244 - Update in-tree libpng to version 1.6.19. r=seth 2015-11-23 20:20:00 +01:00
Mike Hommey 3de00b45dd Bug 1216444 - Remove GKMEDIAS_SHARED_LIBRARY. r=mshal
In bug 922912, we folded back gkmedias.dll info xul.dll, so in practice, there
is no default configuration left that exercises GKMEDIAS_SHARED_LIBRARY. And
sure enough, it's been broken for months in many different ways.

The gkmedias intermediate library is however kept for webrtc signaling tests.
2015-10-21 14:47:22 +09:00
Glenn Randers-Pehrson 9fe5fa0e72 Bug 1192522 - Update libpng/LICENSE to mention two files that are MPL-licensed. r=jrmuizel
--HG--
extra : rebase_source : 766ed23368ab46018e7c178752a8ff9bc509f592
2015-08-08 08:04:00 -04:00
Glenn Randers-Pehrson a39ceed4a2 Bug 1186977 - Update embedded libpng to version 1.6.18. r=jmuizelaar 2015-07-26 20:26:00 +02:00
Eric Rahm 4d6eca8317 Bug 1164622 - Part 1: Remove instances of #ifdef PR_LOGGING in media. r=froydnj
PR_LOGGING is now always defined, we can remove #ifdefs checking for it.
2015-05-14 10:13:24 -07:00
David Major ebde6b9f4f Bug 1157835: Remove the MSVC_ENABLE_PGO flag from the build system. r=glandium
--HG--
extra : rebase_source : 0c47c99bb8b92f8361a51fd81b20a2cc8647a986
2015-04-27 19:59:27 -04:00
Glenn Randers-Pehrson f7c2380ce0 Bug 1147909 - Part 1 - (libpng) Update embedded libpng to version 1.6.17. r=jmuizelaar
--HG--
extra : rebase_source : 84db9860c2d53302de2298aa650050711fe3b4dc
2015-03-30 21:23:00 +02:00
Glenn Randers-Pehrson 4c80b736b4 Bug 1114360 - Update libpng to version 1.6.16. r=jmuizelaar 2014-12-23 06:44:00 +01:00
Glenn Randers-Pehrson 2b1ce96921 Bug 1102523 - Update intree libpng to version 1.6.15. r=jmuizelaar 2014-11-26 05:42:00 +01:00
Carsten "Tomcat" Book 1857927626 Backed out changeset 3947f817fc0a (bug 1102523) for breaking device b2g builds 2014-11-26 11:42:58 +01:00
Glenn Randers-Pehrson eaa149ed34 Bug 1102523 - Update intree libpng to version 1.6.15. r=jmuizelaar 2014-11-24 06:18:00 +01:00
Glenn Randers-Pehrson ef5da08cf7 Bug 1087841 - Update intree libpng to version 1.6.14. r=jmuizelaar 2014-10-29 12:06:00 +01:00