Commit Graph

168 Commits

Author SHA1 Message Date
Andrew Osmond
006448f8a5 Bug 1560441 - Don't create QCMS profiles/transforms during PNG metadata decoding. r=tnikkel
Creating QCMS profiles and transforms are fairly expensive operations
and not necessary for metadata decoding. We can reduce the time required
for PNG metadata decoding by skipping this. The JPEG and WebP decoders
already do this.

Differential Revision: https://phabricator.services.mozilla.com/D35500
2019-06-21 09:08:31 -07:00
Andrew Osmond
008cb2a2d8 Bug 1555934 - Partially backout bug 1255106 part 3 to fix decoders with transparency. r=aosmond 2019-06-11 13:06:15 -04:00
Andrew Osmond
741028ad6b Bug 1255106 - Part 3. Use color management filter with decoders using SurfacePipe. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D26371
2019-05-28 11:38:46 -04:00
Andrew Osmond
a445258270 Bug 1255106 - Part 1. Move color transform state to image decoder base class. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D26369
2019-05-28 11:38:46 -04:00
Andrew Osmond
3befab3ee9 Bug 1530774 - Part 3. Remove decoder support for producing paletted frames. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D23716
2019-03-18 07:30:34 -04:00
Timothy Nikkel
48052cc9cb Bug 1526717. Guard against libpng calling the info callback more than once. r=aosmond
libpng uses the first IDAT chunk it encounters as a signal that it has read all header chunks and to send the info callback.

The testcase png has an IDAT chunk, then a z chunk (not a known chunk type), and then another IDAT chunk.

libpng tracks if we are in an "after idat" state, and throws a benign error if it encounters another IDAT chunk in "after idat" mode, but it just continues normally, processing the idat chunk as if it were the first and therefore sends the info callback again. This seems silly.

https://searchfox.org/mozilla-central/rev/f1c7ba91fad60bfea184006f3728dd6ac48c8e56/media/libpng/pngpread.c#307
2019-03-14 14:32:37 -05:00
Andrew Osmond
b4b0a26151 Bug 1530222 - Allow libpng to allocate larger chunks for decoding purposes. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D21533
2019-03-01 09:47:53 -05:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andrew Osmond
5024f42bc6 Bug 1337111 - Part 2. Add an image decoder flag to request complete frames. r=tnikkel
DecoderFlags::BLEND_ANIMATION will cause the decoder to inject the
BlendAnimationFilter from the previous patch into the SurfacePipe filter
chain. All frames produced by this decoder will be complete, and
should be equivalent to the result outputted by FrameAnimator.
2018-09-17 15:06:28 -04:00
Coroiu Cristina
de5411772c Backed out 6 changesets (bug 1337111) for build bustages at builds/worker/workspace/build/src/image/SurfaceFilters.h on a CLOSED TREE
Backed out changeset ca0caa556dc9 (bug 1337111)
Backed out changeset d7d7fa868d0d (bug 1337111)
Backed out changeset 93e956e89a21 (bug 1337111)
Backed out changeset f36337c1309b (bug 1337111)
Backed out changeset 1b1e25b0b345 (bug 1337111)
Backed out changeset 3785cdebe6a3 (bug 1337111)
2018-09-17 20:42:30 +03:00
Andrew Osmond
d923b67d0f Bug 1337111 - Part 2. Add an image decoder flag to request complete frames. r=tnikkel
DecoderFlags::BLEND_ANIMATION will cause the decoder to inject the
BlendAnimationFilter from the previous patch into the SurfacePipe filter
chain. All frames produced by this decoder will be complete, and
should be equivalent to the result outputted by FrameAnimator.
2018-09-17 13:21:38 -04:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Andrew Osmond
01907fa0e3 Bug 1462355 - Part 1c. Make individual image decoders to use updated Decoder/SurfacePipe methods. r=tnikkel 2018-05-29 08:36:12 -04:00
Glenn Randers-Pehrson
a439abac9e Bug 1402140 - Add "eXIf" to unused_chunks list in PNG decoder. r=jrmuizel 2017-09-21 15:35:00 -04:00
Milan Sreckovic
5c01b5706c Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in image/*. r=aosmond
MozReview-Commit-ID: 8gyxxLziVe7

--HG--
extra : rebase_source : c79e81e10c54106645539c590bf81a03a300a909
2017-08-14 08:29:56 -04:00
Andrew Osmond
93efb56fbf Bug 1315554 - Part 3. Expose Decoder::IsValidICOResource for all decoders. r=tnikkel 2017-07-22 07:50:31 -04:00
Sebastian Hengst
7197a59a77 Backed out changeset 9780a01b3e94 (bug 1315554) 2017-07-22 11:04:17 +02:00
Andrew Osmond
a5bb792dc9 Bug 1315554 - Part 3. Expose Decoder::IsValidICOResource for all decoders. r=tnikkel 2017-07-22 00:14:59 -04: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
Timothy Nikkel
0e7000fdce Bug 1352282. Always fill in the number of loops when decoding an APNG file. r=aosmond
If we were doing a first frame only decode we wouldn't fill in this value. The spec says this chunk must come before any image data so it should always be available at the end of any full decode (whether it be truly full or first frame only).
2017-04-05 11:28:40 -05:00
Vedant Sareen
7d4bd52fae Bug 1330907 - Rename Telemetry::ID to Telemetry::HistogramID. r=dexter
Changed |print("enum ID : uint32_t {", file=output)| to |print("enum HistogramID : uint32_t {", file=output)| at line 53 of the file |toolkit/components/telemetry/gen-histogram-enum.py|, and then replaced all the textual occurrences of |Telemetry::ID| to |Telemetry::HistogramID| and |ID| to |HistogramID| in 43 other files.
2017-02-16 00:45:15 +05:30
Phil Ringnalda
c7b01ecbda Backed out 5 changesets (bug 1290292, bug 1290293) for gfx assertions
CLOSED TREE

Backed out changeset 652c909b75ad (bug 1290293)
Backed out changeset 90a284ea19e3 (bug 1290292)
Backed out changeset 8401d12fe936 (bug 1290293)
Backed out changeset d87488b69c18 (bug 1290293)
Backed out changeset 7368aa665fae (bug 1290293)
2017-02-13 19:28:45 -08:00
Andrew Osmond
6679005d2a Bug 1290293 - Part 2e. Make SurfacePipe users clear unwritten pixels if the image is truncated. r=tnikkel 2016-08-18 09:55:45 -04:00
Andrew Osmond
ca5d0ac0fd Bug 1290293 - Part 2a. Make nsPNGDecoder clear on which surface format is being used. r=tnikkel 2016-08-18 09:55:45 -04: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
d0f907ce9b Bug 1297907 - Wrap long lines in nsPNGDecoder.cpp. r=tn
--HG--
extra : rebase_source : 01aba31d91a42a3afe30ea2ddc21118ae779ef79
2016-09-07 09:03:00 -04:00
Glenn Randers-Pehrson
7cd996e732 Bug 1295671 - Detect use of system libpng in nsPNGDecoder.cpp. r=tn
--HG--
extra : histedit_source : d6ce06bff319953f2abfa9b3d3acad3386b0a654
2016-08-27 01:23:00 -04:00
Seth Fowler
e527c3b511 Bug 1295506 - Don't yield hidden frames in the PNG decoder. r=edwin 2016-08-17 22:19:42 -07: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
Seth Fowler
98a9fd7db6 Bug 1291071 (Part 4) - Clean up Decoder::SpeedHistogram() and related code. r=edwin 2016-08-05 18:50:29 -07:00
Seth Fowler
19dc4aba32 Bug 1292505 (Part 2) - Remove remaining references to Downscaler in the SurfacePipe decoders. r=edwin 2016-08-05 13:44:52 -07:00
Glenn Randers-Pehrson
a5af07b18b Bug 1240665 - Log all error returns from the PNG decoder. r=tnikkel
--HG--
extra : rebase_source : 373eef390fe03a2559e336539ddc6a546d6ec2d7
2016-07-29 05:11:00 +02:00
Seth Fowler
6ce660afb2 Bug 1291054 (Part 4) - Add Decoder convenience methods for the common case of frame rects that cover the whole image. r=edwin 2016-08-02 04:10:52 -07:00
Seth Fowler
3cca5ff418 Bug 1291054 (Part 3) - Rename Decoder::GetSize() to Decoder::Size() to be consistent with the style guide. r=edwin 2016-08-02 04:10:51 -07:00
Seth Fowler
881c87ebec Bug 1291054 (Part 2) - Add a Decoder::OutputSize() getter and use it in the decoders. r=edwin 2016-08-02 04:10:49 -07:00
Glenn Randers-Pehrson
e2b623ebe9 Bug 1283961 - Part 2: Remove limits on PNG image dimensions (nsPNGDecoder). r=seth
--HG--
extra : rebase_source : 8c138a12011233e320d4e55e95348c4c961b95b6
2016-07-28 07:37:00 -04:00
Seth Fowler
78ccdc2e84 Bug 1288040 (Part 5) - Wrap frame timeout values in a FrameTimeout type that ensures they're normalized. r=edwin 2016-07-20 16:30:28 -07:00
Seth Fowler
62bf80f260 Bug 1287691 (Part 3) - Yield after each frame in the PNG decoder. r=edwin 2016-07-20 02:30:37 -07:00
Makoto Kato
1cb4228397 Backed out 4 changesets (bug 1287691) due to Windows build failure
MozReview-Commit-ID: KgV3nU9a64F
2016-07-20 11:03:59 +09:00
Seth Fowler
78f3ee9ee6 Bug 1287691 (Part 3) - Yield after each frame in the PNG decoder. r=edwin 2016-07-19 17:15:01 -07:00
Seth Fowler
666fc943cb Bug 1287367 - Allow users of StreamingLexer to detect and handle truncation. r=njn 2016-07-18 23:41:20 -07:00
Seth Fowler
938a963f7f Bug 1287246 (Part 1) - Expose LexerResult from the StreamingLexer API and add an explicit Yield type. r=njn 2016-07-18 01:25:37 -07:00
Seth Fowler
4c2a4667a7 Bug 1286165 (Part 2) - Advance decoders' SourceBufferIterator directly in StreamingLexer. r=edwin,njn 2016-07-15 17:48:57 -07:00
Seth Fowler
3c38000891 Bug 1285867 (Part 1) - Remove Decoder's notion of decoder errors. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler
bd9732ac1b Bug 1285865 (Part 6) - Pass a SourceBufferIterator to Decoder::DoDecode(). r=edwin 2016-07-11 12:13:13 -07:00
Seth Fowler
e80fff4085 Bug 1285865 (Part 5) - Return a Maybe<TerminalState> from Decoder::DoDecode(). r=edwin 2016-07-11 12:13:11 -07:00
Seth Fowler
a9f24e8308 Bug 1285865 (Part 4) - Rename Decoder::WriteInternal() to Decoder::DoDecode() and fix its argument types. r=edwin 2016-07-11 12:13:09 -07:00