Name Description Size Coverage
AnimationFrameBuffer.cpp 18461 93 %
AnimationFrameBuffer.h An AnimationFrameBuffer owns the frames outputted by an animated image decoder as well as directing its owner on how to drive the decoder, whether to produce more or to stop. This should be subclassed by the different types of queues, depending on what behaviour is desired. 16887 95 %
AnimationParams.h 1808 100 %
AnimationSurfaceProvider.cpp aForDisplay 18429 80 %
AnimationSurfaceProvider.h An ISurfaceProvider for animated images. 4867 86 %
AutoRestoreSVGState.h 2723 100 %
BlobSurfaceProvider.cpp static 10970 0 %
BlobSurfaceProvider.h An ISurfaceProvider that manages blob recordings of SVG images. Unlike the rasterized ISurfaceProviders, it only provides a recording which may be replayed in the compositor process by WebRender. It may be invalidated directly in order to reuse the resource ids and underlying buffers when the SVG image has changed (e.g. it is animated). 4767 0 %
BMPHeaders.h 1270 -
build 97 %
ClippedImage.cpp 19545 74 %
ClippedImage.h An Image wrapper that clips an image against a rectangle. Right now only absolute coordinates in pixels are supported. XXX(seth): There a known (performance, not correctness) issue with GetImageContainer. See the comments for that method for more information. 4070 100 %
CopyOnWrite.h CopyOnWrite<T> allows code to safely read from a data structure without worrying that reentrant code will modify it. 8265 100 %
DecodedSurfaceProvider.cpp aAlwaysProxy = 8088 82 %
DecodedSurfaceProvider.h An ISurfaceProvider implemented for single-frame decoded surfaces. 3095 75 %
DecodePool.cpp static 5637 99 %
DecodePool.h DecodePool manages the threads used for decoding raster images. 3423 0 %
Decoder.cpp Common implementation of the decoder interface. 20724 94 %
Decoder.h Interface which owners of an animated Decoder object must implement in order to use recycling. It allows the decoder to get a handle to the recycled frames. 22533 97 %
DecoderFactory.cpp static 14888 90 %
DecoderFactory.h Creates and initializes a decoder for non-animated images of type @aType. (If the image *is* animated, only the first frame will be decoded.) The decoder will send notifications to @aImage. @param aType Which type of decoder to create - JPEG, PNG, etc. @param aImage The image will own the decoder and which should receive notifications as decoding progresses. @param aSourceBuffer The SourceBuffer which the decoder will read its data from. @param aIntrinsicSize The intrinsic size of the image, normally obtained during the metadata decode. @param aOutputSize The output size for the decoder. If this is smaller than the intrinsic size, the decoder will downscale the image. @param aDecoderFlags Flags specifying the behavior of this decoder. @param aSurfaceFlags Flags specifying the type of output this decoder should produce. @param aOutTask Task representing the decoder. @return NS_OK if the decoder has been created/initialized successfully; NS_ERROR_ALREADY_INITIALIZED if there is already an active decoder for this image; Else some other unrecoverable error occurred. 9172 -
DecoderFlags.h Flags that influence decoder behavior. Note that these flags *don't* influence the logical content of the surfaces that the decoder generates, so they're not in a factor in SurfaceCache lookups and the like. These flags instead either influence which surfaces are generated at all or the tune the decoder's behavior for a particular scenario. 1788 100 %
decoders 82 %
Downscaler.cpp = false 10300 76 %
Downscaler.h Downscaler is a high-quality, streaming image downscaler based upon Skia's scaling implementation. 4880 75 %
DownscalingFilter.h DownscalingSurfaceFilter is a SurfaceFilter implementation for use with SurfacePipe which performs Lanczos downscaling. It's in this header file, separated from the other SurfaceFilters, because some preprocessor magic is necessary to ensure that there aren't compilation issues on platforms where Skia is unavailable. 10756 93 %
DynamicImage.cpp 9111 33 %
DynamicImage.h An Image that is dynamically created. The content of the image is provided by a gfxDrawable. It's anticipated that most uses of DynamicImage will be ephemeral. 2312 100 %
encoders 74 %
FetchDecodedImage.cpp 4421 95 %
FetchDecodedImage.h This method fetches an image URI and starts decoding the image soon as possible. Either resolves the promise with the decoded imgIContainer or rejects with an nsresult, for e.g. network failures or decoding errors. @param aURI URI of the image to download. @param aSize Size to decode the image at (if possible). Use zero width or height to prevent resizing. 1660 -
FrameAnimator.cpp = true 20365 86 %
FrameAnimator.h Call this whenever a decode completes, a decode starts, or the image is discarded. It will update the internal state. Specifically mDiscarded, mCompositedFrameInvalid, and mIsCurrentlyDecoded. If aAllowInvalidation is true then returns a rect to invalidate. 11670 97 %
FrameTimeout.h FrameTimeout wraps a frame timeout value (measured in milliseconds) after first normalizing it. This normalization is necessary because some tools generate incorrect frame timeout values which we nevertheless have to support. For this reason, code that deals with frame timeouts should always use a FrameTimeout value rather than the raw value from the image header. 3709 90 %
FrozenImage.cpp aWhichFrame - ignored 4752 43 %
FrozenImage.h An Image wrapper that disables animation, freezing the image at its first frame. It does this using two strategies. If this is the only instance of the image, animation will never start, because IncrementAnimationConsumers is ignored. If there is another instance that is animated, that's still OK, because any imgIContainer method that is affected by animation gets its aWhichFrame argument set to FRAME_FIRST when it passes through FrozenImage. XXX(seth): There a known (performance, not correctness) issue with GetImageContainer. See the comments for that method for more information. 3396 100 %
ICOFileHeaders.h The header that comes right at the start of an icon file. (This corresponds to the Windows ICONDIR structure.) 2013 -
IDecodingTask.cpp 7673 98 %
IDecodingTask.h An interface for tasks which can execute on the ImageLib DecodePool, and various implementations. 3380 67 %
Image.cpp static 8012 80 %
Image.h 14182 90 %
ImageBlocker.cpp static 2087 96 %
ImageBlocker.h f6fcd651-164b-4416-b001-9c8c393fd93b 1087 -
ImageCacheKey.cpp static 3936 91 %
ImageCacheKey.h ImageCacheKey is the key type for the image cache (see imgLoader.h). 2564 100 %
ImageFactory.cpp static 8006 87 %
ImageFactory.h Registers vars with Preferences. Should only be called on the main thread. 3205 -
ImageLogging.h const char * constructor 6378 66 %
ImageMemoryReporter.cpp aIsForCompositor 6259 76 %
ImageMemoryReporter.h Initializes image related memory reporting in the compositor process when using WebRender. 3473 -
ImageMetadata.h 3861 100 %
ImageOps.cpp static 8022 72 %
ImageOps.h Creates a version of an existing image which does not animate and is frozen at the first frame. @param aImage The existing image. 5961 100 %
ImageRegion.h An axis-aligned rectangle in tiled image space, with an optional sampling restriction rect. The drawing code ensures that if a sampling restriction rect is present, any pixels sampled during the drawing process are found within that rect. The sampling restriction rect exists primarily for callers which perform pixel snapping. Other callers should generally use one of the Create() overloads. 8600 69 %
ImageUtils.cpp aComplete 19585 84 %
ImageUtils.h The type of decoder; this is usually determined from a MIME type using DecoderFactory::GetDecoderType() or ImageUtils::GetDecoderType(). 3635 90 %
ImageWrapper.cpp 9271 44 %
ImageWrapper.h Abstract superclass for Images that wrap other Images. 2460 100 %
ImgDrawResult.h An enumeration representing the result of a drawing operation. Most users of ImgDrawResult will only be interested in whether the value is SUCCESS or not. The other values are primarily useful for debugging and error handling. SUCCESS: We successfully drew a completely decoded frame of the requested size. Drawing again with FLAG_SYNC_DECODE would not change the result. SUCCESS_NOT_COMPLETE: The image was drawn successfully and completely, but it hasn't notified about the sync-decode yet. This can only happen when layout pokes at the internal image state beforehand via the result of StartDecodingWithResult. This should probably go away eventually, somehow, see bug 1471583. INCOMPLETE: We successfully drew a frame that was partially decoded. (Note that successfully drawing a partially decoded frame may not actually draw any pixels!) Drawing again with FLAG_SYNC_DECODE would improve the result. WRONG_SIZE: We successfully drew a wrongly-sized frame that had to be scaled. This is only returned if drawing again with FLAG_SYNC_DECODE would improve the result; if the size requested was larger than the intrinsic size of the image, for example, we would generally have to scale whether FLAG_SYNC_DECODE was specified or not, and therefore we would not return WRONG_SIZE. NOT_READY: We failed to draw because no decoded version of the image was available. Drawing again with FLAG_SYNC_DECODE would improve the result. (Though FLAG_SYNC_DECODE will not necessarily work until after the image's load event!) TEMPORARY_ERROR: We failed to draw due to a temporary error. Drawing may succeed at a later time. BAD_IMAGE: We failed to draw because the image has an error. This is a permanent condition. BAD_ARGS: We failed to draw because bad arguments were passed to draw(). NOT_SUPPORTED: The requested operation is not supported, but the image is otherwise valid. 4594 94 %
imgFrame.cpp This class is identical to SourceSurfaceSharedData but returns a different type so that SharedSurfacesChild is aware imagelib wants to recycle this surface for future animation frames. 23332 75 %
imgFrame.h Initialize this imgFrame with an empty surface and prepare it for being written to by a decoder. This is appropriate for use with decoded images, but it should not be used when drawing content into an imgFrame, as it may use a different graphics backend than normal content drawing. 14457 95 %
imgICache.idl imgICache interface @author Stuart Parmenter <pavlov@netscape.com> @version 0.1 @see imagelib2 3780 -
imgIContainer.idl This represents an image's intrinsic size, in units of pixels (the same units as our 'width' and 'height' attributes). Both components are optional, because an image (particularly a vector image) may lack an intrinsic width and/or height. We use signed types for the components, but the values are expected to be nonnegative; any negative values should be considered an error. (Zero is valid, though.) Note that this is similar to a gfx::IntSize, except for the use of Maybe<> to reflect that the components are optional. This is also similar to nsIFrame.h's mozilla::IntrinsicSize class, with the difference being pixel units here vs. nscoord units there. 30813 -
imgIContainerDebug.idl This interface is used in debug builds (and only there) in order to let automatic tests running JavaScript access internal state of imgContainers. This lets us test things like animation. 937 -
imgIEncoder.idl imgIEncoder interface 5882 -
imgILoader.idl imgILoader interface @author Stuart Parmenter <pavlov@netscape.com> @version 0.3 @see imagelib2 4035 -
imgINotificationObserver.idl 2118 -
imgIRequest.idl imgIRequest interface @author Stuart Parmenter <stuart@mozilla.com> @version 0.1 @see imagelib2 9232 -
imgIScriptedNotificationObserver.idl 824 -
imgITools.idl decodeImageFromBuffer Caller provides an buffer, a buffer size and a mimetype. We read from the stream and decompress it (according to the specified mime type) and return the resulting imgIContainer. @param aBuffer Data in memory. @param aSize Buffer size. @param aMimeType Type of image in the stream. 7954 -
imgLoader.cpp 129688 82 %
imgLoader.h updateTime = 20865 95 %
imgRequest.cpp 39940 89 %
imgRequest.h 10835 94 %
imgRequestProxy.cpp member initializers and constructor code 39068 87 %
imgRequestProxy.h 20557898-1dd2-11b2-8f65-9c462ee2bc95 9294 100 %
imgTools.cpp aIsMultiPart 21987 91 %
imgTools.h 3d8fa16d-c9e1-4b50-bdef-2c7ae249967a 940 0 %
IProgressObserver.h An interface for observing changes to image state, as reported by ProgressTracker. This is the ImageLib-internal version of imgINotificationObserver, essentially, with implementation details that code outside of ImageLib shouldn't see. XXX(seth): It's preferable to avoid adding anything to this interface if possible. In the long term, it would be ideal to get to a place where we can just use the imgINotificationObserver interface internally as well. 1712 100 %
ISurfaceProvider.h An interface for objects which can either store a surface or dynamically generate one, and various implementations. 11730 78 %
LookupResult.h LookupResult is the return type of SurfaceCache's Lookup*() functions. It combines a surface with relevant metadata tracked by SurfaceCache. 5522 100 %
moz.build 3696 -
MultipartImage.cpp aLastPart = 13945 90 %
MultipartImage.h An Image wrapper that implements support for multipart/x-mixed-replace images. 2813 100 %
nsIIconURI.idl nsIIconURI This interface derives from nsIURI, to provide additional information about moz-icon URIs. What *is* a moz-icon URI you ask? Well, it has the following syntax: moz-icon:[<valid-url> | //<file-with-extension> | //stock/<stock-icon>]? ['?'[<parameter-value-pairs>]] <valid-url> is a valid URL spec. <file-with-extension> is any filename with an extension, e.g. "dummy.html". If the file you want an icon for isn't known to exist, you can use this instead of a URL and just place a dummy file name with the extension or content type you want. <stock-icon> is the name of a platform-dependant stock icon. Legal parameter value pairs are listed below: Parameter: size Values: [<integer> | button | toolbar | toolbarsmall | menu | dialog] Description: If integer, this is the desired size in square pixels of the icon Else, use the OS default for the specified keyword context. Parameter: state Values: [normal | disabled] Description: The state of the icon. Parameter: contentType Values: <mime-type> Description: The mime type we want an icon for. This is ignored by stock images. 2968 -
Orientation.h A struct that describes an image's orientation as a rotation optionally followed by a reflection. This may be used to be indicate an image's inherent orientation or a desired orientation for the image. When flipFirst = true, this indicates that the reflection is applied before the rotation. (This is used by OrientedImage to represent the inverse of an underlying image's Orientation.) 3503 100 %
OrientedImage.cpp 11554 68 %
OrientedImage.h An Image wrapper that rotates and/or flips an image according to a specified Orientation. XXX(seth): There a known (performance, not correctness) issue with GetImageContainer. See the comments for that method for more information. 3992 100 %
PlaybackType.h PlaybackType identifies a surface cache entry as either a static surface or an animation. Note that a specific cache entry is one or the other, but images may be associated with both types of cache entries, since in some circumstances we may want to treat an animated image as if it were static. 1527 100 %
ProgressTracker.cpp 16409 89 %
ProgressTracker.h Image progress bitflags. See CheckProgressConsistency() for the invariants we enforce about the ordering dependencies between these flags. 8600 100 %
RasterImage.cpp RasterImage::RasterImage(nsIURI* aURI /* = nullptr 56693 90 %
RasterImage.h @file This file declares the RasterImage class, which handles static and animated rasterized images. @author Stuart Parmenter <pavlov@netscape.com> @author Chris Saari <saari@netscape.com> @author Arron Mogge <paper@animecity.nu> @author Andrew Smith <asmith15@learn.senecac.on.ca> 17937 83 %
remote 80 %
Resolution.h The resolution of an image, in dppx. 1958 91 %
rust 82 %
ScriptedNotificationObserver.cpp aUnused 2478 100 %
ScriptedNotificationObserver.h 1098 100 %
ShutdownTracker.cpp static 1988 89 %
ShutdownTracker.h ShutdownTracker is an imagelib-global service that allows callers to check whether shutdown has started. 1407 -
SourceBuffer.cpp 23026 88 %
SourceBuffer.h SourceBuffer is a single producer, multiple consumer data structure used for storing image source (compressed) data. 19155 90 %
StreamingLexer.h StreamingLexer is a lexing framework designed to make it simple to write image decoders without worrying about the details of how the data is arriving from the network. 32394 92 %
SurfaceCache.cpp SurfaceCache is a service for caching temporary surfaces in imagelib. 70185 88 %
SurfaceCache.h SurfaceCache is a service for caching temporary surfaces and decoded image data in imagelib. 21359 95 %
SurfaceCacheUtils.cpp static 513 100 %
SurfaceCacheUtils.h SurfaceCacheUtils provides an ImageLib-external API to interact with ImageLib's SurfaceCache. 901 -
SurfaceFilters.h This header contains various SurfaceFilter implementations that apply transformations to image data, for usage with SurfacePipe. 53696 95 %
SurfaceFlags.h Flags that change the output a decoder generates. Because different combinations of these flags result in logically different surfaces, these flags must be taken into account in SurfaceCache lookups. 2509 65 %
SurfacePipe.cpp 5269 96 %
SurfacePipe.h A SurfacePipe is a pipeline that consists of a series of SurfaceFilters terminating in a SurfaceSink. Each SurfaceFilter transforms the image data in some way before the SurfaceSink ultimately writes it to the surface. This design allows for each transformation to be tested independently, for the transformations to be combined as needed to meet the needs of different situations, and for all image decoders to share the same code for these transformations. Writing to the SurfacePipe is done using lambdas that act as generator functions. Because the SurfacePipe machinery controls where the writes take place, a bug in an image decoder cannot cause a buffer overflow of the underlying surface. 33095 95 %
SurfacePipeFactory.h FilterPipeline is a helper template for SurfacePipeFactory that determines the full type of the sequence of SurfaceFilters that a sequence of configuration structs corresponds to. To make this work, all configuration structs must include a typedef 'Filter' that identifies the SurfaceFilter they configure. 36050 60 %
SVGDocumentWrapper.cpp 12054 89 %
SVGDocumentWrapper.h This class wraps an SVG document, for use by VectorImage objects. 4417 60 %
SVGDrawingCallback.h 1242 100 %
SVGDrawingParameters.h 1940 100 %
test 98 %
VectorImage.cpp 57374 88 %
VectorImage.h Callback for SVGRootRenderingObserver. This just sets a dirty flag that we check in VectorImage::RequestRefresh, which is called under the ticks of the refresh driver of any observing documents that we may have. Only then (after all animations in this image have been updated) do we send out "frame changed" notifications, 5531 40 %
WebRenderImageProvider.h Generate an ImageKey for the given frame. @param aSurface The current frame. This should match what was cached via SetCurrentFrame, but if it does not, it will need to regenerate the cached ImageKey. 1917 25 %