Name Description Size
AnimationFrameBuffer.cpp 18138
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
AnimationParams.h 1808
AnimationSurfaceProvider.cpp aForDisplay 18429
AnimationSurfaceProvider.h An ISurfaceProvider for animated images. 4867
AutoRestoreSVGState.h 2717
BlobSurfaceProvider.cpp static 10970
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). 4764
BMPHeaders.h 1270
ClippedImage.cpp 19135
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. 3991
CopyOnWrite.h CopyOnWrite<T> allows code to safely read from a data structure without worrying that reentrant code will modify it. 8265
DecodedSurfaceProvider.cpp aAlwaysProxy = 8088
DecodedSurfaceProvider.h An ISurfaceProvider implemented for single-frame decoded surfaces. 3095
DecodePool.cpp static 5668
DecodePool.h DecodePool manages the threads used for decoding raster images. 3451
Decoder.cpp Common implementation of the decoder interface. 18589
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. 22113
DecoderFactory.cpp static 13840
DecoderFactory.h The type of decoder; this is usually determined from a MIME type using DecoderFactory::GetDecoderType(). 9137
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. 1895
Downscaler.cpp = false 10207
Downscaler.h Downscaler is a high-quality, streaming image downscaler based upon Skia's scaling implementation. 4893
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. 10788
DynamicImage.cpp 8757
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
FrameAnimator.cpp = true 20365
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
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
FrozenImage.cpp aWhichFrame - ignored 4752
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. 3424
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
IDecodingTask.h An interface for tasks which can execute on the ImageLib DecodePool, and various implementations. 3380
Image.cpp static 7923
Image.h 14248
ImageBlocker.cpp static 2127
ImageBlocker.h f6fcd651-164b-4416-b001-9c8c393fd93b 1073
ImageCacheKey.cpp static 5846
ImageCacheKey.h ImageCacheKey is the key type for the image cache (see imgLoader.h). 2617
ImageFactory.cpp static 8029
ImageFactory.h Registers vars with Preferences. Should only be called on the main thread. 3205
ImageLogging.h const char * constructor 6378
ImageMemoryReporter.cpp aIsForCompositor 6213
ImageMemoryReporter.h Initializes image related memory reporting in the compositor process when using WebRender. 3473
ImageMetadata.h 3590
ImageOps.cpp static 7773
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. 5665
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
ImageWrapper.cpp 9144
ImageWrapper.h Abstract superclass for Images that wrap other Images. 2460
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. 4626
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. 23950
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. 13722
imgICache.idl imgICache interface @author Stuart Parmenter <> @version 0.1 @see imagelib2 3490
imgIContainer.idl imgIContainer is the interface that represents an image. It allows access to frames as Thebes surfaces. It also allows drawing of images onto Thebes contexts. Internally, imgIContainer also manages animation of images. 29102
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 5832
imgILoader.idl imgILoader interface @author Stuart Parmenter <> @version 0.3 @see imagelib2 4035
imgINotificationObserver.idl 2118
imgIRequest.idl imgIRequest interface @author Stuart Parmenter <> @version 0.1 @see imagelib2 9107
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 aAnonymize 121175
imgLoader.h updateTime = 18339
imgRequest.cpp 39862
imgRequest.h 10746
imgRequestProxy.cpp member initializers and constructor code 39040
imgRequestProxy.h 20557898-1dd2-11b2-8f65-9c462ee2bc95 8735
imgTools.cpp aIsMultiPart 21705
imgTools.h 3d8fa16d-c9e1-4b50-bdef-2c7ae249967a 926
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
ISurfaceProvider.h An interface for objects which can either store a surface or dynamically generate one, and various implementations. 11730
LookupResult.h LookupResult is the return type of SurfaceCache's Lookup*() functions. It combines a surface with relevant metadata tracked by SurfaceCache. 5522 3485
MultipartImage.cpp aLastPart = 13733
MultipartImage.h An Image wrapper that implements support for multipart/x-mixed-replace images. 2813
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. 2926
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
OrientedImage.cpp 11555
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. 4017
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
ProgressTracker.cpp 16409
ProgressTracker.h Image progress bitflags. See CheckProgressConsistency() for the invariants we enforce about the ordering dependencies between these flags. 8629
RasterImage.cpp RasterImage::RasterImage(nsIURI* aURI /* = nullptr 56487
RasterImage.h @file This file declares the RasterImage class, which handles static and animated rasterized images. @author Stuart Parmenter <> @author Chris Saari <> @author Arron Mogge <> @author Andrew Smith <> 18333
Resolution.h The resolution of an image, in dppx. 1958
ScriptedNotificationObserver.cpp aUnused 2478
ScriptedNotificationObserver.h 1098
ShutdownTracker.cpp static 1988
ShutdownTracker.h ShutdownTracker is an imagelib-global service that allows callers to check whether shutdown has started. 1407
SourceBuffer.cpp 22490
SourceBuffer.h SourceBuffer is a single producer, multiple consumer data structure used for storing image source (compressed) data. 18345
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
SurfaceCache.cpp SurfaceCache is a service for caching temporary surfaces in imagelib. 70229
SurfaceCache.h SurfaceCache is a service for caching temporary surfaces and decoded image data in imagelib. 21359
SurfaceCacheUtils.cpp static 513
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
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
SurfacePipe.cpp 5269
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. 33123
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. 31590
SVGDocumentWrapper.cpp 12453
SVGDocumentWrapper.h This class wraps an SVG document, for use by VectorImage objects. 4472
SVGDrawingCallback.h 1242
SVGDrawingParameters.h 1967
VectorImage.cpp 55968
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, 5568
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