Commit Graph

1814 Commits

Author SHA1 Message Date
Seth Fowler
f3261cccb4 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
3566f109af 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
5a1fea4fd4 Bug 1194059 (Part 3) - Ensure the nsIInputStream LoadImage() returns is always buffered. r=tn 2015-08-14 00:37:16 -07:00
Seth Fowler
4a88a2f80a Bug 1194059 (Part 2) - Always detect IS_ANIMATED during the metadata decode. r=tn 2015-08-14 00:37:13 -07:00
Seth Fowler
9d6cd4fe9b 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
86bc7eb389 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
1197eb9502 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
2d7a5a79d3 Backed out changeset f99b27e40987 (bug 1193924) for B2G emulator bustage.
CLOSED TREE
2015-08-13 12:45:05 -04:00
Christoph Kerschbaumer
447af75903 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
6a2b326a41 Bug 1191114 (Part 4) - Add tests for metadata decoding, including that we always deliver HAS_TRANSPARENCY during the metadata decode. r=tn 2015-08-12 10:41:11 -07:00
Seth Fowler
15e076ac81 Bug 1191114 (Part 3) - Add flags to image test cases. r=tn 2015-08-12 10:41:08 -07:00
Seth Fowler
dc9d155e39 Bug 1191114 (Part 2) - Add support for creating an anonymous metadata decoder, for use in tests. r=tn 2015-08-12 10:41:05 -07:00
Seth Fowler
2facec6512 Bug 1191114 (Part 1) - Always detect HAS_TRANSPARENCY during the metadata decode. r=tn 2015-08-12 10:41:02 -07:00
Seth Fowler
a7ab6ac01e Bug 1192356 (Part 2) - Take advantage of mozilla::Tie() in RasterImage.cpp. r=tn 2015-08-11 23:50:33 -07:00
Seth Fowler
bbb9ada747 Bug 1192356 (Part 1) - Take advantage of mozilla::Tie() in SurfaceCache.cpp. r=dholbert 2015-08-11 23:50:31 -07:00
Kyle Huey
0a62d4d460 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
527cba8957 Bug 1191090 - Use the normal PNG decoder for PNG metadata decodes. r=tn 2015-08-10 15:34:27 -07:00
Birunthan Mohanathas
e1f0334d06 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
5e2bd8d78a Bug 1127534 - Remove assertion before creating a channel (r=sicking) 2015-08-02 10:42:22 -07:00
Ehsan Akhgari
3ae1ec3884 Bug 1181863 - Part 4: Fix the build bustage 2015-08-01 00:07:04 -04:00
Seth Fowler
0102832838 Bug 1181863 (Part 3) - Add tests for DecodeToSurface(). r=tn 2015-07-31 18:10:34 -07:00
Seth Fowler
ddbf64e1fc 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
fc7b24b7b8 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
ed5f3b08de No bug - Remove obsolete comment in SourceBuffer.h. r=me 2015-07-31 18:10:26 -07:00
Seth Fowler
6cf8108408 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
d7d368b6c9 Bug 1187386 (Part 7) - Eliminate remaining dependencies on a non-null mImage in Decoder. r=tn 2015-07-31 07:29:18 -07:00
Seth Fowler
5b920b75e5 Bug 1187386 (Part 6) - Merge Decoder::Finish() and RasterImage::OnDecodingComplete() into RasterImage::FinalizeDecoder(). r=tn 2015-07-31 07:29:15 -07:00
Seth Fowler
ace4842b4f Bug 1187386 (Part 5) - Merge Decoder::SetSizeOnImage() into ImageMetadata::SetOnImage(). r=tn 2015-07-31 07:29:12 -07:00
Seth Fowler
1b0b4a7c6a Bug 1187386 (Part 4) - Make imgFrame::SetOptimizable() callable from off-main-thread. r=tn 2015-07-31 07:29:10 -07:00
Seth Fowler
07437fd82e Bug 1187386 (Part 3) - Don't destroy Decoder::mImage if Decoder::mImage is null. r=tn 2015-07-31 07:29:07 -07:00
Seth Fowler
a1c94fd9c5 Bug 1187386 (Part 2) - Rework decoder code to avoid calling Decode::GetImage(). r=tn 2015-07-31 07:29:03 -07:00
Seth Fowler
d5de49efd5 Bug 1187386 (Part 1) - Make most decoder state private. r=tn 2015-07-31 07:29:00 -07:00
Seth Fowler
49c394e147 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
d7eac98ff6 Bug 1188462 - Fix inclusion of skia headers to use correct directory prefixes. r=jrmuizel 2015-07-29 16:31:40 -04:00
Lee Salzman
cf88f83a89 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
584b0b326c 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
242308999c 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.
2015-07-28 23:24:24 -07:00
Aidin Gharibnavaz
31046168cb Bug 108603 - Remove NS_IMPL_QUERY_INTERFACE_INHERITED0. r=mccr8, r=froydnj 2015-07-24 12:13:00 -04:00
Bobby Holley
59c4d9cf6c Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Nicholas Nethercote
3a84fe11ee 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.)
2015-07-28 21:02:45 -07:00
Nicholas Nethercote
fc5b781b3f Bug 1188705 (part 2) - Remove unused SizeOfDecodedWithComputedFallbackIfHeap declaration. r=seth. 2015-07-28 18:58:57 -07:00
Wes Kocher
68b9154e3f Backed out changesets f6d75433812f,7864cbaa9e5d (bug 1173214) for reftest failures CLOSED TREE 2015-07-28 15:20:25 -07:00
Gijs Kruitbosch
1f2429ca3f Bug 1173214. Be a little more more careful with moz-icon URIs. r=bzbarsky 2015-07-16 15:24:51 +01:00
Seth Fowler
a0d4f607c9 Bug 1184996 (Part 4) - Forbid instantiation of decoders except via DecoderFactory. r=tn 2015-07-22 22:39:56 -07:00
Seth Fowler
ff2b61cc0f 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
23308ca239 Bug 1184996 (Part 2) - Clean up RasterImage's decoding API. r=tn 2015-07-22 22:39:51 -07:00
Seth Fowler
a0a0a54320 Bug 1184996 (Part 1) - Create decoders with a DecoderFactory. r=tn 2015-07-22 22:39:48 -07:00
Seth Fowler
af0e57e951 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
4c7622aada Bug 1186112 - Get rid of the #define'd constants in BMPFileHeaders.h. r=tn 2015-07-22 15:49:49 -07:00
Seth Fowler
651173cae8 Bug 1185592 (Part 2) - Make RasterImage store the decoder type instead of the MIME type. r=baku 2015-07-21 09:42:30 -07:00