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

1814 Коммитов

Автор SHA1 Сообщение Дата
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 7000b611ae Bug 1194059 (Part 4) - Add tests that we detect IS_ANIMATED during the metadata decode. r=tn 2015-08-14 00:37:19 -07:00
Seth Fowler e9af374dd3 Bug 1194059 (Part 3) - Ensure the nsIInputStream LoadImage() returns is always buffered. r=tn 2015-08-14 00:37:16 -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 e328e789ee Bug 1194059 (Part 1) - Ensure that metadata decode progress is always delivered atomically. r=tn 2015-08-14 00:37:11 -07:00
Christoph Kerschbaumer a2927d618d Bug 1193924 - Add assertion to AsyncOpen to make sure asyncOpen2() was called first when securityflags in loadInfo are set (r=sicking) 2015-08-12 21:36:33 -07:00
Seth Fowler 56e8e38eb3 Bug 1194557 - Ensure that if the image was locked before RecoverFromLossOfFrames() was called, it's still locked afterwards. r=tn 2015-08-13 20:39:54 -07:00
Ryan VanderMeulen ec552557f5 Backed out changeset f99b27e40987 (bug 1193924) for B2G emulator bustage.
CLOSED TREE
2015-08-13 12:45:05 -04:00
Christoph Kerschbaumer ecdc701ca0 Bug 1193924 - Add assertion to AsyncOpen to make sure asyncOpen2() was called first when securityflags in loadInfo are set (r=sicking) 2015-08-12 21:36:33 -07:00
Seth Fowler 688a7b4ccc Bug 1191114 (Part 4) - Add tests for metadata decoding, including that we always deliver HAS_TRANSPARENCY during the metadata decode. r=tn
--HG--
extra : rebase_source : a75678990dfe110dcafed02591da45854a0b2c92
2015-08-12 10:41:11 -07:00
Seth Fowler 2293f110ab Bug 1191114 (Part 3) - Add flags to image test cases. r=tn
--HG--
extra : rebase_source : ae18f059f8dcd70959567631afac9436f3214b6f
2015-08-12 10:41:08 -07:00
Seth Fowler b83a44287a Bug 1191114 (Part 2) - Add support for creating an anonymous metadata decoder, for use in tests. r=tn
--HG--
extra : rebase_source : 465523f87fda3ac80484fd368c9bbfe3daca2afc
2015-08-12 10:41:05 -07:00
Seth Fowler c012dc0aa9 Bug 1191114 (Part 1) - Always detect HAS_TRANSPARENCY during the metadata decode. r=tn
--HG--
extra : rebase_source : 97c8568f33abd1f2a8d9ef5679ce3ac904f0758f
2015-08-12 10:41:02 -07:00
Seth Fowler b388f51c02 Bug 1192356 (Part 2) - Take advantage of mozilla::Tie() in RasterImage.cpp. r=tn 2015-08-11 23:50:33 -07:00
Seth Fowler 65cf06375b Bug 1192356 (Part 1) - Take advantage of mozilla::Tie() in SurfaceCache.cpp. r=dholbert 2015-08-11 23:50:31 -07:00
Kyle Huey 76e3009ab8 Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Seth Fowler c0f83249c8 Bug 1191090 - Use the normal PNG decoder for PNG metadata decodes. r=tn
--HG--
extra : rebase_source : c0d1f9f8e376cbe4ebf1921d3e1edf85234e8f7b
2015-08-10 15:34:27 -07:00
Birunthan Mohanathas 7315345693 Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
Christoph Kerschbaumer ccd1961c44 Bug 1127534 - Remove assertion before creating a channel (r=sicking) 2015-08-02 10:42:22 -07:00
Ehsan Akhgari 509e505cbb Bug 1181863 - Part 4: Fix the build bustage 2015-08-01 00:07:04 -04:00
Seth Fowler b925bc97d1 Bug 1181863 (Part 3) - Add tests for DecodeToSurface(). r=tn 2015-07-31 18:10:34 -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 edf105e8f6 Bug 1181863 (Part 1) - Add support for reading from nsIInputStreams directly to SourceBuffer. r=tn 2015-07-31 18:10:29 -07:00
Seth Fowler ecb9be44a0 No bug - Remove obsolete comment in SourceBuffer.h. r=me 2015-07-31 18:10:26 -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
Seth Fowler ffee281e15 Bug 1187386 (Part 6) - Merge Decoder::Finish() and RasterImage::OnDecodingComplete() into RasterImage::FinalizeDecoder(). r=tn
--HG--
extra : rebase_source : e2d1bce9222366f3dff2bf8b1ccb755ba44140ae
2015-07-31 07:29:15 -07:00
Seth Fowler 973fa019ef Bug 1187386 (Part 5) - Merge Decoder::SetSizeOnImage() into ImageMetadata::SetOnImage(). r=tn
--HG--
extra : rebase_source : 5da2023b266e44970fd0fff7442ad8eea4939379
2015-07-31 07:29:12 -07:00
Seth Fowler 3fdb290471 Bug 1187386 (Part 4) - Make imgFrame::SetOptimizable() callable from off-main-thread. r=tn
--HG--
extra : rebase_source : 726f0b66275f80acd655720a2aa684fb18d9016f
2015-07-31 07:29:10 -07:00
Seth Fowler a87de31e6a Bug 1187386 (Part 3) - Don't destroy Decoder::mImage if Decoder::mImage is null. r=tn
--HG--
extra : rebase_source : dc22bcc48ece67dd8af9a65aacd74b2f1a56f9a6
2015-07-31 07:29:07 -07:00
Seth Fowler 947de7376b Bug 1187386 (Part 2) - Rework decoder code to avoid calling Decode::GetImage(). r=tn
--HG--
extra : rebase_source : 6fc835a3468e846cb59474efcfea5355914a9dc4
2015-07-31 07:29:03 -07:00
Seth Fowler 5a46946f86 Bug 1187386 (Part 1) - Make most decoder state private. r=tn
--HG--
extra : rebase_source : 0d9179626707ac70e772ed3d768ce4d802a144be
2015-07-31 07:29:00 -07:00
Seth Fowler c1d6404a0a Bug 1189593 - Only use SSE2 in image::Downscaler if we're running on an SSE2-capable machine. r=tn 2015-07-30 19:48:22 -07:00
Lee Salzman f15be30759 Bug 1188462 - Fix inclusion of skia headers to use correct directory prefixes. r=jrmuizel 2015-07-29 16:31:40 -04:00
Lee Salzman cf2fe05f07 Bug 1188462 - Add SKIA_INCLUDES list for adding Skia to header search path. r=jrmuizel 2015-07-30 12:05:22 -04:00
Daniel Holbert f26b08f16f Bug 1188569: Drop unneeded MOZ_WARN_UNUSED_RESULT from from LookupBestMatch in SurfaceCache.cpp. r=seth 2015-07-30 12:35:19 -07:00
Nicholas Nethercote 87b80f8c66 Bug 1188745 - Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis(). r=froydnj.
This makes it clearer that, unlike how SizeOf*() functions usually work, this
doesn't measure any children hanging off the array.

And do likewise for nsTObserverArray.

--HG--
extra : rebase_source : 6a8c8d8ffb53ad51b5773afea77126cdd767f149
2015-07-28 23:24:24 -07:00
Aidin Gharibnavaz 99b2a37529 Bug 108603 - Remove NS_IMPL_QUERY_INTERFACE_INHERITED0. r=mccr8, r=froydnj
--HG--
extra : rebase_source : 98a86a1ff5d023aa74800de8feb1cfe1846edf03
2015-07-24 12:13:00 -04:00
Bobby Holley 97b9240b34 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Nicholas Nethercote 31ef869796 Bug 1188705 (part 3) - Simplify imgFrame::SizeOfExcludingThis(). r=seth.
imgFrame::SizeOfExcludingThis() measures heap and non-heap memory in a very
complex way. This patch simplifies it and removes gfxMemoryLocation in the
process. (gfxMemoryLocation::OUT_OF_PROCESS was unused.)

--HG--
extra : rebase_source : 72af38fa438b4b42df02231bcf2fa731d247b60d
2015-07-28 21:02:45 -07:00
Nicholas Nethercote 03c7260391 Bug 1188705 (part 2) - Remove unused SizeOfDecodedWithComputedFallbackIfHeap declaration. r=seth.
--HG--
extra : rebase_source : 3a961b643e5a96b6e13bf54c05e057f50156a037
2015-07-28 18:58:57 -07:00
Wes Kocher 84dc3c46ed Backed out changesets f6d75433812f,7864cbaa9e5d (bug 1173214) for reftest failures CLOSED TREE
--HG--
extra : amend_source : ca7728a234390116922c2390f748afcc87f6a082
extra : histedit_source : 7864cbaa9e5d105f4c758025ccbe51317f35b108%2C00b8364cdec6b60907bd71508c092df02878a834
2015-07-28 15:20:25 -07:00
Gijs Kruitbosch c02e9dd583 Bug 1173214. Be a little more more careful with moz-icon URIs. r=bzbarsky 2015-07-16 15:24:51 +01:00
Seth Fowler 88affc4d10 Bug 1184996 (Part 4) - Forbid instantiation of decoders except via DecoderFactory. r=tn 2015-07-22 22:39:56 -07:00
Seth Fowler 1732630df1 Bug 1184996 (Part 3) - Replace all remaining references to 'size decodes' with 'metadata decodes'. r=tn 2015-07-22 22:39:54 -07:00
Seth Fowler aaf1463494 Bug 1184996 (Part 2) - Clean up RasterImage's decoding API. r=tn 2015-07-22 22:39:51 -07:00
Seth Fowler f0851b622a Bug 1184996 (Part 1) - Create decoders with a DecoderFactory. r=tn 2015-07-22 22:39:48 -07:00
Seth Fowler 191c75a743 Bug 1186667 - Correctly report IMAGE_DECODE_COUNT and IMAGE_MAX_DECODE_COUNT telemetry for only non-size decodes. r=tn 2015-07-22 22:39:45 -07:00
Seth Fowler 2697700b81 Bug 1186112 - Get rid of the #define'd constants in BMPFileHeaders.h. r=tn
--HG--
extra : rebase_source : f9b19180e1a09adff4695a50eb65612f337392f3
2015-07-22 15:49:49 -07:00
Seth Fowler df89701ef1 Bug 1185592 (Part 2) - Make RasterImage store the decoder type instead of the MIME type. r=baku
--HG--
extra : rebase_source : 0f7c0973a26a9ada7d720e3f9a051f3d198e010e
2015-07-21 09:42:30 -07:00