Commit Graph

62 Commits

Author SHA1 Message Date
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
c4e69d01bb Bug 1287691 (Part 4) - Leave notifying decoding progress for each frame to DecodingTask. r=edwin 2016-07-19 17:15:01 -07:00
Seth Fowler
966d0547b7 Bug 1287691 (Part 1) - Expose yielding to decoding tasks. r=edwin 2016-07-19 17:15:01 -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
4be29e46b3 Bug 1285867 (Part 7) - Clean up remaining references to decoder 'data errors' and refer to them as just 'errors'. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler
905634be2b Bug 1285867 (Part 6) - Record Decoder telemetry outside of the loop. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler
063f83b278 Bug 1285867 (Part 5) - Replace Decoder::mDataDone with Decoder::mReachedTerminalState. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler
396c016b13 Bug 1285867 (Part 4) - Decide whether we're done decoding by checking if we've reached a terminal state. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler
b1af28a2d7 Bug 1285867 (Part 3f) - Only call PostDataError() outside the loop. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler
0d49568090 Bug 1285867 (Part 3e) - Use TerminalState to exit the Decode() loop. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler
87c5e4a570 Bug 1285867 (Part 3d) - Rely on TerminalState to decide when to post errors inside the loop. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler
1204600670 Bug 1285867 (Part 3c) - Replace the Decode() |while| loop with a |do| loop. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler
e8aa76cc0d Bug 1285867 (Part 3b) - Replace the series of |if| statements in the Decode() loop with a |switch|. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler
f5b3f999dd Bug 1285867 (Part 3a) - Don't attempt to keep decoding if we're already done. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler
0872ad00cb Bug 1285867 (Part 2) - Don't call Decoder::PostDataError() from Decoder subclasses. r=edwin 2016-07-15 16:41:11 -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
Seth Fowler
9ef391acb2 Bug 1285865 (Part 3) - Inline Decoder::Write() into Decoder::Decode(). r=edwin 2016-07-11 12:13:07 -07:00
Seth Fowler
b9c1cec011 Bug 1285865 (Part 2) - Add a RAII class to record decoder telemetry. r=edwin 2016-07-11 12:13:05 -07:00
Seth Fowler
a50b8d5f3e Bug 1285865 (Part 1) - Remove Decoder::Write() checks that are redundant with Decoder::Decode(). r=edwin 2016-07-11 12:13:02 -07:00
Seth Fowler
e4439cf3bc Bug 1185799 (Part 3) - Make nsICODecoder use only the public Decoder interface for writing to its contained decoder. r=edwin 2016-07-07 15:50:49 -07:00
Seth Fowler
6361b2adb8 Bug 1185799 (Part 1) - Use DecoderFactory to construct nsICODecoder's contained decoder. r=edwin 2016-07-07 15:50:44 -07:00
Seth Fowler
f9272b3af2 Bug 1282327 (Part 1) - Store ISurfaceProviders in the ImageLib SurfaceCache. r=dholbert 2016-07-02 18:47:44 -06:00
Seth Fowler
43c4cb86a4 Revert "Bug 1282327 - Store ISurfaceProviders in the ImageLib SurfaceCache. r=dholbert"; it was accidentally pushed.
This reverts commit 57147126cc04361268e606ac9e94c65e2bd4c886.
2016-06-29 18:36:34 -07:00
Seth Fowler
d35c501ce3 Bug 1282327 - Store ISurfaceProviders in the ImageLib SurfaceCache. r=dholbert 2016-06-29 18:33:20 -07:00
Seth Fowler
41627d474f Bug 1282259 - Run IDecodingTasks instead of Decoders directly in image::DecodePool. r=dholbert 2016-06-29 13:46:27 -07:00
Seth Fowler
17074a1b49 Bug 1255107 (Part 3) - Use SurfacePipe in the PNG decoder. r=njn 2016-06-25 14:04:05 -07:00
Timothy Nikkel
2c28cda879 Bug 1271002. Notify right away after getting the first frame of an animated image. r=seth
The decoding loop in Decoder::Decode only pauses to report progress when it runs out of bytes to decode. So for long animated images where the network is keeping up with decoding it will be a relatively long time until we deliver the first frame complete notification and corresponding invalidation. In most cases this shouldn't be too expensive as it is just dispatching a runnable to the main thread from the decoding thread.
2016-05-13 21:32:21 -05:00
Sebastian Hengst
fe00520851 Backed out changeset 2ac62de7365d (bug 1271002) for crash in GTest: [@ mozilla::image::RasterImage::UpdateImageContainer]. r=backout 2016-05-14 00:08:18 +02:00
Timothy Nikkel
316a0874c5 Bug 1271002. Notify right away after getting the first frame of an animated image. r=seth
The decoding loop in Decoder::Decode only pauses to report progress when it runs out of bytes to decode. So for long animated images where the network is keeping up with decoding it will be a relatively long time until we deliver the first frame complete notification and corresponding invalidation. In most cases this shouldn't be too expensive as it is just dispatching a runnable to the main thread from the decoding thread.
2016-05-13 16:19:55 -05:00
Timothy Nikkel
6d672b7854 Bug 1270997. Send invalidations for the first image frame properly. r=seth
This was caused by http://hg.mozilla.org/mozilla-central/rev/167ceb965079 (bug 1194059). Before that changeset mIsAnimated meant "we currently have more than one frame". After that changeset mIsAnimated was replaced with HasAnimation(). HasAnimation() just looks at the metadata to see if the image is animated. That changeset had the effect of always detected if an image is animated during the metadata decode. Therefore during a full decode we always know the image is animated, even before we've decoded two or more frames.

The fix is to go back to using the actual current frame count to manage invalidations.
2016-05-07 15:54:39 -05:00
Aidin Gharibnavaz
686438c658 Bug 1164581 - Adding an overload for NS_ProxyRelease that accepts already_AddRefed, and removing all the others. r=bobbyholley 2016-02-10 08:23:00 +01:00
Nicholas Nethercote
8c0fc6309a Bug 1238558 (part 1) - Add Decoder::BeforeFinishInternal(). r=tnikkel.
--HG--
extra : rebase_source : 613a2ce0931b8b6c67d93e4d55e965193bbb55d0
2016-01-27 16:15:06 -08:00
Carsten "Tomcat" Book
5b358688b7 Backed out changeset c18e29c1b369 (bug 1164581) for cpp unit tests test failures
--HG--
extra : rebase_source : fb6fd434c8e3f4b5fa53ea645a54c07cab207894
2016-02-08 11:17:38 +01:00
Aidin Gharibnavaz
69cf7e035f Bug 1164581 - Adding an overload for NS_ProxyRelease that accepts already_AddRefed, and removing all the others. r=bobbyholley
--HG--
extra : rebase_source : 3c6bba6613a14e48239d302bdd0f7fe2e322265d
2016-02-07 10:56:00 +01:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Seth Fowler
c1229ef66c Bug 1146663 (Part 5) - Require that all image decoders support downscale-during-decode. r=tn 2015-09-19 16:21:08 -07:00
Seth Fowler
6b70afe46f Bug 1146663 (Part 2) - Remove the concept of lifetimes from the SurfaceCache. r=dholbert 2015-09-19 16:20:59 -07:00
Seth Fowler
cf30b4b43c No bug - Fix out-of-date comment in Decoder.cpp. r=me 2015-09-08 22:07:15 -07:00
Seth Fowler
20e4c2ad62 Bug 1196065 - Add sanity tests for image decoders. r=tn
--HG--
extra : rebase_source : d8b4912e671abe9fa041ee6ca906ba8f23a70ebb
2015-08-19 14:04:01 -07:00
Sebastian Hengst
05cd1ebf4f Backed out changeset 3cafd6b3967b (bug 1196065) for OSX 10.7 static build failure. r=backout 2015-08-19 11:15:57 +02:00
Seth Fowler
9c99214046 Bug 1196065 - Add sanity tests for image decoders. r=tn 2015-08-19 00:41:30 -07:00
Seth Fowler
f89ca1d90f Bug 1185800 - Add DecoderFlags and SurfaceFlags enum classes and use them instead of imgIContainer flags in all decoder-related code. r=tn 2015-08-14 17:56:44 -07:00
Seth Fowler
7e909725b3 Bug 1194059 (Part 2) - Always detect IS_ANIMATED during the metadata decode. r=tn 2015-08-14 00:37:13 -07:00
Seth Fowler
9f17da1f58 Bug 1181863 (Part 2) - Add ImageOps::DecodeToSurface() to allow image decoding without involving any main-thread-only objects. r=tn 2015-07-31 18:10:31 -07:00
Seth Fowler
c17342d0b4 Bug 1187546 - Make it possible to ask image decoders to only decode the first frame. r=tn 2015-07-31 18:10:23 -07:00
Seth Fowler
747226a550 Bug 1187386 (Part 7) - Eliminate remaining dependencies on a non-null mImage in Decoder. r=tn
--HG--
extra : rebase_source : b987299e018353af3bd322f8a857d2f20864b711
2015-07-31 07:29:18 -07:00