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
decoders
encoders
test
AnimationSurfaceProvider.cpp
AnimationSurfaceProvider.h
BMPHeaders.h
ClippedImage.cpp
ClippedImage.h
CopyOnWrite.h
DecodePool.cpp
DecodePool.h
DecodedSurfaceProvider.cpp
DecodedSurfaceProvider.h
Decoder.cpp
Decoder.h
DecoderFactory.cpp
DecoderFactory.h
DecoderFlags.h
Downscaler.cpp
Downscaler.h
DownscalingFilter.h
DrawResult.h
DynamicImage.cpp
DynamicImage.h
FrameAnimator.cpp
FrameAnimator.h
FrameTimeout.h
FrozenImage.cpp
FrozenImage.h
ICOFileHeaders.h
IDecodingTask.cpp
IDecodingTask.h
IProgressObserver.h
ISurfaceProvider.h
Image.cpp
Image.h
ImageCacheKey.cpp
ImageCacheKey.h
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
ImageLogging.h
ImageMetadata.h
ImageOps.cpp
ImageOps.h
ImageRegion.h
ImageURL.h
ImageWrapper.cpp
ImageWrapper.h
LookupResult.h
MultipartImage.cpp
MultipartImage.h
Orientation.h
OrientedImage.cpp
OrientedImage.h
PlaybackType.h
ProgressTracker.cpp
ProgressTracker.h
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
SVGDocumentWrapper.cpp
SVGDocumentWrapper.h
SVGDrawingParameters.h
ScriptedNotificationObserver.cpp
ScriptedNotificationObserver.h
ShutdownTracker.cpp
ShutdownTracker.h
SourceBuffer.cpp
SourceBuffer.h
StreamingLexer.h
SurfaceCache.cpp
SurfaceCache.h
SurfaceCacheUtils.cpp
SurfaceCacheUtils.h
SurfaceFilters.h
SurfaceFlags.h
SurfacePipe.cpp
SurfacePipe.h
SurfacePipeFactory.h
VectorImage.cpp
VectorImage.h
imgFrame.cpp
imgFrame.h
imgICache.idl
imgIContainer.idl
imgIContainerDebug.idl
imgIEncoder.idl
imgILoader.idl
imgINotificationObserver.idl
imgIOnloadBlocker.idl
imgIRequest.idl
imgIScriptedNotificationObserver.idl
imgITools.idl
imgLoader.cpp
imgLoader.h
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
imgRequestProxy.h
imgTools.cpp
imgTools.h
moz.build
nsIIconURI.idl