gecko-dev/image
Andrew Osmond f67ab8c057 Bug 1382783 - Retarget non-HTTP image URIs (chrome, blob) to the image IO thread if not an SVG. r=tnikkel
Currently we only permit requests from HTTP channels to be retargeted to
the image IO thread. It was implemented this way originally in bug
867755 but it does not appear there was a specific reason for that.

The only kink in this is some browser chrome mochitests listen on debug
build only events to ensure certain chrome images are loaded and/or
drawn. As such, this patch ensures that those observer notifications
continue to be served, requiring a dispatch from the image IO thread to
the main thread.

Another issue to note is that SVGs must be processed on the main thread;
the underlying SVG document can only be accessed from it. We enforce
this by checking the content type. The possibility already exists that
an HTTP response could contain the wrong content type, and in that case,
we fail to decode the image, as there is no content sniffing support for
SVG. Thus there should be no additional risk taken by using the image IO
thread from other non-HTTP channels (if they don't specify the SVG
content type, it is not rendered today, and if they do, it will remain
on the main thread as it is today).

We also ignore data URIs. The specification requires that we process
these images sychronously. See bug 1325080 for details.
2017-09-25 11:44:49 -04:00
..
build Bug 1388332 - Fix a shutdown crash when destroying image decoders before initializing its SurfacePipe. r=tnikkel 2017-08-09 06:54:55 -04:00
decoders Bug 1402140 - Add "eXIf" to unused_chunks list in PNG decoder. r=jrmuizel 2017-09-21 15:35:00 -04:00
encoders Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm) 2017-06-14 14:44:04 -07:00
test Backed out changeset e273a191e75d (bug 1370412) for Windows gtest failures. 2017-09-05 09:37:11 -04:00
AnimationSurfaceProvider.cpp Bug 1389479 - Part 3. AnimationSurfaceProvider no longer needs to always dispatch to free its RasterImage. r=tnikkel 2017-08-15 15:02:14 -04:00
AnimationSurfaceProvider.h Bug 1341624 - Include shared handle totals in memory reports for images. r=tnikkel 2017-02-22 09:30:22 -05:00
BMPHeaders.h
ClippedImage.cpp 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 2017-08-14 08:29:56 -04:00
ClippedImage.h Bug 1323912 - Part 2. Pass opacity down to imgIContainer::Draw. r=mstange 2017-01-03 13:53:22 +08:00
CopyOnWrite.h
DecodedSurfaceProvider.cpp Bug 1370412 - Part 8b. Add ImageSurfaceCache::Prune to discard surfaces which are not needed in factor of 2 mode. r=tnikkel 2017-09-05 07:58:46 -04:00
DecodedSurfaceProvider.h
DecodePool.cpp Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
DecodePool.h Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange. 2017-06-22 17:08:53 +10:00
Decoder.cpp 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 2017-08-14 08:29:56 -04:00
Decoder.h Bug 1315554 - Part 3. Expose Decoder::IsValidICOResource for all decoders. r=tnikkel 2017-07-22 07:50:31 -04:00
DecoderFactory.cpp Bug 1370412 - Part 8a. Add "substitutable" flag to ISurfaceProvider state to indicate when the caller won't accept substitutes. r=tnikkel 2017-09-05 07:58:45 -04:00
DecoderFactory.h Bug 1315554 - Part 8. Allow DecoderFactory::CreateDecoderForICOResource to create metadata decoders. r=tnikkel 2017-07-22 07:50:32 -04:00
DecoderFlags.h Bug 1370412 - Part 8a. Add "substitutable" flag to ISurfaceProvider state to indicate when the caller won't accept substitutes. r=tnikkel 2017-09-05 07:58:45 -04:00
Downscaler.cpp 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 2017-08-14 08:29:56 -04:00
Downscaler.h 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 2017-08-14 08:29:56 -04:00
DownscalingFilter.h Bug 1375842 - increase SIMD padding for convolution filter to 31 bytes. r=jrmuizel 2017-07-07 13:32:05 -04:00
DrawResult.h Bug 1351440 - Part 1. Implement imgDrawingParams. r=jwatt 2017-05-18 22:03:36 +02:00
DynamicImage.cpp Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
DynamicImage.h Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
FrameAnimator.cpp Bug 1370412 - Part 9. Add factor of 2 state to the SurfaceCache memory reports. r=tnikkel 2017-09-05 07:58:46 -04:00
FrameAnimator.h Bug 1388733 - Ensure animations resume when the image surfaces are discarded while still decoding. r=tnikkel 2017-08-09 22:26:55 -04:00
FrameTimeout.h Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
FrozenImage.cpp Bug 1323912 - Part 2. Pass opacity down to imgIContainer::Draw. r=mstange 2017-01-03 13:53:22 +08:00
FrozenImage.h Bug 1323912 - Part 2. Pass opacity down to imgIContainer::Draw. r=mstange 2017-01-03 13:53:22 +08:00
ICOFileHeaders.h
IDecodingTask.cpp Bug 1359833 - Part 2. IDecodingTask should use the event target from ProgressTracker for main thread runnables. r=tnikkel 2017-07-19 14:15:11 -04:00
IDecodingTask.h Bug 1359833 - Part 2. IDecodingTask should use the event target from ProgressTracker for main thread runnables. r=tnikkel 2017-07-19 14:15:11 -04:00
Image.cpp Bug 1382662 - ImageResource::SendOnUnlockedDraw should dispatch using ProgressTracker::GetEventTarget. r=tnikkel 2017-08-14 20:24:55 -04:00
Image.h Bug 1370412 - Part 9. Add factor of 2 state to the SurfaceCache memory reports. r=tnikkel 2017-09-05 07:58:46 -04:00
ImageCacheKey.cpp Bug 1377158 - (Part 2) Add the info of StyloEnabled() to hash function to make reftests of styloVsGecko get the correct caches. r=heycam 2017-07-24 11:51:20 +08:00
ImageCacheKey.h Bug 1377158 - (Part 2) Add the info of StyloEnabled() to hash function to make reftests of styloVsGecko get the correct caches. r=heycam 2017-07-24 11:51:20 +08:00
ImageFactory.cpp Bug 1382783 - Retarget non-HTTP image URIs (chrome, blob) to the image IO thread if not an SVG. r=tnikkel 2017-09-25 11:44:49 -04:00
ImageFactory.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
ImageLogging.h
ImageMetadata.h Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
ImageOps.cpp Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
ImageOps.h Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
ImageRegion.h Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel 2017-07-05 11:22:00 -04:00
ImageURL.h Bug 1378046 - Make ImageCacheKey::Hash() return PLDHashNumber; r=aosmond 2017-07-04 11:09:03 -04:00
ImageWrapper.cpp Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
ImageWrapper.h Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
imgFrame.cpp Bug 1391430 - Force heap allocated surfaces for image decoding to use an unaligned stride. r=tnikkel 2017-08-31 06:38:55 -04:00
imgFrame.h Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
imgICache.idl Bug 1352408. Restore imgICache::RemoveEntry. r=ehsan 2017-04-11 03:14:09 -05:00
imgIContainer.idl Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
imgIContainerDebug.idl
imgIEncoder.idl
imgILoader.idl
imgINotificationObserver.idl
imgIOnloadBlocker.idl
imgIRequest.idl Bug 1357318 - remember previous priority boost request in imgRequest. r=tnikkel 2017-03-22 19:52:15 +08:00
imgIScriptedNotificationObserver.idl
imgITools.idl Bug 1387790 - Remove [deprecated] decodeImageData from imgITools. r=tnikkel 2017-08-06 10:54:14 +09:00
imgLoader.cpp Bug 870698 - Part 2: Replace Append("") with AppendLiteral(""). r=erahm 2017-09-03 22:14:11 -07:00
imgLoader.h Bug 1247843 - Part 3: Set request context ID to the http channel created in imgLoader::LoadImage. r=baku 2017-09-20 20:09:00 -04:00
imgRequest.cpp Bug 1382783 - Retarget non-HTTP image URIs (chrome, blob) to the image IO thread if not an SVG. r=tnikkel 2017-09-25 11:44:49 -04:00
imgRequest.h Bug 1382783 - Retarget non-HTTP image URIs (chrome, blob) to the image IO thread if not an SVG. r=tnikkel 2017-09-25 11:44:49 -04:00
imgRequestProxy.cpp Bug 1382658 - imgRequestProxy::DoRemoveFromLoadGroup and imgCancelRunnable should be dispatched on labelled group if possible. r=tnikkel 2017-08-15 07:14:51 -04:00
imgRequestProxy.h Bug 1382658 - imgRequestProxy::DoRemoveFromLoadGroup and imgCancelRunnable should be dispatched on labelled group if possible. r=tnikkel 2017-08-15 07:14:51 -04:00
imgTools.cpp Bug 1387790 - Remove [deprecated] decodeImageData from imgITools. r=tnikkel 2017-08-06 10:54:14 +09:00
imgTools.h
IProgressObserver.h Bug 1359833 - Part 1. ProgressTracker should select an event target from observers and expose to callers. r=tnikkel 2017-07-19 14:15:11 -04:00
ISurfaceProvider.h Bug 1341624 - Include shared handle totals in memory reports for images. r=tnikkel 2017-02-22 09:30:22 -05:00
LookupResult.h Bug 1370412 - Part 2. Give image::LookupResult an optional preferred size to decode at when the surface is not found. r=tnikkel 2017-09-05 07:58:45 -04:00
moz.build Bug 1401356, part 1 - Rename nsSVGEffects.h/.cpp to SVGObserverUtils.h/.cpp. r=longsonr 2017-08-30 14:14:46 +01:00
MultipartImage.cpp
MultipartImage.h
nsIIconURI.idl
Orientation.h
OrientedImage.cpp 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 2017-08-14 08:29:56 -04:00
OrientedImage.h Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
PlaybackType.h
ProgressTracker.cpp Bug 1359833 - Part 1. ProgressTracker should select an event target from observers and expose to callers. r=tnikkel 2017-07-19 14:15:11 -04:00
ProgressTracker.h Bug 1359833 - Part 1. ProgressTracker should select an event target from observers and expose to callers. r=tnikkel 2017-07-19 14:15:11 -04:00
RasterImage.cpp Bug 1382783 - Retarget non-HTTP image URIs (chrome, blob) to the image IO thread if not an SVG. r=tnikkel 2017-09-25 11:44:49 -04:00
RasterImage.h Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
ScriptedNotificationObserver.cpp Bug 1359833 - Part 8. ScriptedNotificationObserver should use nsAutoScriptBlocker when issuing notifications. r=tnikkel 2017-07-19 14:15:12 -04:00
ScriptedNotificationObserver.h
ShutdownTracker.cpp
ShutdownTracker.h
SourceBuffer.cpp Bug 1383404 - Part 2. When SourceBuffer::ExpectLength creates the initial buffer, it should not round up. r=tnikkel 2017-08-01 06:59:11 -04:00
SourceBuffer.h Bug 1383404 - Part 3. SourceBuffer::mChunks should be an AutoTArray instead of FallibleTArray. r=tnikkel 2017-08-01 06:59:11 -04:00
StreamingLexer.h Bug 1399079 - Fix StreamingLexer::Clone assert to handle SourceBuffer insertion failures. r=tnikkel 2017-09-13 07:26:04 -04:00
SurfaceCache.cpp Bug 1401524 - Ensure SurfaceCache state coherency whenever we perform an operation that may discard surfaces. r=tnikkel 2017-09-21 16:56:38 -04:00
SurfaceCache.h Bug 1370412 - Part 8b. Add ImageSurfaceCache::Prune to discard surfaces which are not needed in factor of 2 mode. r=tnikkel 2017-09-05 07:58:46 -04:00
SurfaceCacheUtils.cpp
SurfaceCacheUtils.h
SurfaceFilters.h 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 2017-08-14 08:29:56 -04:00
SurfaceFlags.h
SurfacePipe.cpp 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 2017-08-14 08:29:56 -04:00
SurfacePipe.h Bug 1388332 - Fix a shutdown crash when destroying image decoders before initializing its SurfacePipe. r=tnikkel 2017-08-09 06:54:55 -04:00
SurfacePipeFactory.h
SVGDocumentWrapper.cpp Bug 1401356, part 2 - Rename nsSVGEffects to SVGObserverUtils. r=longsonr 2017-08-30 15:58:31 +01:00
SVGDocumentWrapper.h Bug 1328832 - Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky 2017-01-05 15:31:56 +08:00
SVGDrawingParameters.h Bug 1360511 - Move SVGDrawingParameters to a header file to allow it to be shared. r=longsonr 2017-04-18 12:46:19 +01:00
VectorImage.cpp Bug 1401356, part 2 - Rename nsSVGEffects to SVGObserverUtils. r=longsonr 2017-08-30 15:58:31 +01:00
VectorImage.h Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00