Name Description Size
AnimationFrameBuffer.cpp 18183
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. 16797
AnimationParams.h 1808
AnimationSurfaceProvider.cpp aForDisplay 16447
AnimationSurfaceProvider.h An ISurfaceProvider for animated images. 4245
BMPHeaders.h 957
build 4
ClippedImage.cpp 20355
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. 4323
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 = 7079
DecodedSurfaceProvider.h An ISurfaceProvider implemented for single-frame decoded surfaces. 2687
DecodePool.cpp static 13008
DecodePool.h DecodePool manages the threads used for decoding raster images. 3418
Decoder.cpp Common implementation of the decoder interface. 17459
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. 21531
DecoderFactory.cpp static 12623
DecoderFactory.h The type of decoder; this is usually determined from a MIME type using DecoderFactory::GetDecoderType(). 8952
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. 1501
decoders 21
Downscaler.cpp = false 10223
Downscaler.h Downscaler is a high-quality, streaming image downscaler based upon Skia's scaling implementation. 5974
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. 11592
DynamicImage.cpp 8763
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. 2565
encoders 5
FrameAnimator.cpp = true 18460
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. 12019
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 4079
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. 3314
ICOFileHeaders.h The header that comes right at the start of an icon file. (This corresponds to the Windows ICONDIR structure.) 2013
IDecodingTask.cpp 8731
IDecodingTask.h An interface for tasks which can execute on the ImageLib DecodePool, and various implementations. 3580
Image.cpp 14820
Image.h 15171
ImageCacheKey.cpp static 7026
ImageCacheKey.h ImageCacheKey is the key type for the image cache (see imgLoader.h). 2718
ImageFactory.cpp static 8122
ImageFactory.h Registers vars with Preferences. Should only be called on the main thread. 3205
ImageLogging.h const char * constructor 6378
ImageMemoryReporter.cpp aIsForCompositor 6005
ImageMemoryReporter.h Initializes image related memory reporting in the compositor process when using WebRender. 3472
ImageMetadata.h 3267
ImageOps.cpp static 7675
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. 5342
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. 4443
ImageWrapper.cpp 9134
ImageWrapper.h Abstract superclass for Images that wrap other Images. 2713
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 nsStyleImage::StartDecoding. 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. 4620
imgFrame.cpp 31179
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. 15701
imgICache.idl imgICache interface @author Stuart Parmenter <> @version 0.1 @see imagelib2 2771
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. 27332
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 5476
imgILoader.idl imgILoader interface @author Stuart Parmenter <> @version 0.3 @see imagelib2 4165
imgINotificationObserver.idl 2106
imgIRequest.idl imgIRequest interface @author Stuart Parmenter <> @version 0.1 @see imagelib2 8191
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. 6855
imgLoader.cpp aAnonymize 108312
imgLoader.h stabilize 17775
imgRequest.cpp 39514
imgRequest.h 10331
imgRequestProxy.cpp member initializers and constructor code 39212
imgRequestProxy.h 20557898-1dd2-11b2-8f65-9c462ee2bc95 8327
imgTools.cpp ========== imgITools implementation ========== 17272
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. 1896
ISurfaceProvider.h An interface for objects which can either store a surface or dynamically generate one, and various implementations. 11163
LookupResult.h LookupResult is the return type of SurfaceCache's Lookup*() functions. It combines a surface with relevant metadata tracked by SurfaceCache. 4939 3371
MultipartImage.cpp 10295
MultipartImage.h An Image wrapper that implements support for multipart/x-mixed-replace images. 2938
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. 3319
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. 1457
OrientedImage.cpp 12368
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. 3266
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 18300
ProgressTracker.h Image progress bitflags. See CheckProgressConsistency() for the invariants we enforce about the ordering dependencies betweeen these flags. 9760
RasterImage.cpp RasterImage::RasterImage(nsIURI* aURI /* = nullptr 54665
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 <> 18000
RecyclingSourceSurface.h This surface subclass will prevent the underlying surface from being recycled as long as it is still alive. We will create this surface to wrap imgFrame's mLockedSurface, if we are accessing it on a path that will keep the surface alive for an indeterminate period of time (e.g. imgFrame::GetSourceSurface, imgFrame::Draw with a recording or capture DrawTarget). 2286
ScriptedNotificationObserver.cpp aUnused 2458
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 22607
SourceBuffer.h SourceBuffer is a single producer, multiple consumer data structure used for storing image source (compressed) data. 18133
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. 32400
SurfaceCache.cpp SurfaceCache is a service for caching temporary surfaces in imagelib. 59461
SurfaceCache.h SurfaceCache is a service for caching temporary surfaces and decoded image data in imagelib. 18961
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. 48839
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. 2035
SurfacePipe.cpp 2959
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. 30069
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. 8410
SVGDocumentWrapper.cpp 12250
SVGDocumentWrapper.h This class wraps an SVG document, for use by VectorImage objects. 3952
SVGDrawingParameters.h 2019
test 7
VectorImage.cpp 52038
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, 6370