Name Description Size
AnimationFrameBuffer.cpp 10312
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. Based upon its given configuration parameters, it will retain up to a certain number of frames in the buffer before deciding to discard previous frames, and relying upon the decoder to recreate older frames when the animation loops. It will also request that the decoder stop producing more frames when the display of the frames are far behind -- this allows other tasks and images which require decoding to take execution priority. The desire is that smaller animated images should be kept completely in memory while larger animated images should only keep a certain number of frames to minimize our memory footprint at the cost of CPU. 7141
AnimationSurfaceProvider.cpp 13309
AnimationSurfaceProvider.h An ISurfaceProvider for animated images. 3800
BMPHeaders.h 957
build 3
ClippedImage.cpp 20266
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. 4290
CopyOnWrite.h CopyOnWrite<T> allows code to safely read from a data structure without worrying that reentrant code will modify it. 8090
DecodedSurfaceProvider.cpp aAlwaysProxy = 7079
DecodedSurfaceProvider.h An ISurfaceProvider implemented for single-frame decoded surfaces. 2687
DecodePool.cpp static 12982
DecodePool.h DecodePool manages the threads used for decoding raster images. 3418
Decoder.cpp Common implementation of the decoder interface. 15565
Decoder.h Initialize an image decoder. Decoders may not be re-initialized. @return NS_OK if the decoder could be initialized successfully. 20220
DecoderFactory.cpp static 12504
DecoderFactory.h The type of decoder; this is usually determined from a MIME type using DecoderFactory::GetDecoderType(). 8806
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. 1500
decoders 19
Downscaler.cpp = false 10116
Downscaler.h Downscaler is a high-quality, streaming image downscaler based upon Skia's scaling implementation. 5973
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. 11722
DynamicImage.cpp 8515
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. 2569
encoders 5
FrameAnimator.cpp = true 38811
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. 15083
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 3995
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. 3275
ICOFileHeaders.h The header that comes right at the start of an icon file. (This corresponds to the Windows ICONDIR structure.) 2013
IDecodingTask.cpp 8088
IDecodingTask.h An interface for tasks which can execute on the ImageLib DecodePool, and various implementations. 3715
Image.cpp 12936
Image.h Flags for Image initialization. Meanings: INIT_FLAG_NONE: Lack of flags INIT_FLAG_DISCARDABLE: The container should be discardable INIT_FLAG_DECODE_IMMEDIATELY: The container should decode as soon as possible, regardless of what our heuristics say. INIT_FLAG_TRANSIENT: The container is likely to exist for only a short time before being destroyed. (For example, containers for multipart/x-mixed-replace image parts fall into this category.) If this flag is set, INIT_FLAG_DISCARDABLE and INIT_FLAG_DECODE_ONLY_ON_DRAW must not be set. INIT_FLAG_SYNC_LOAD: The container is being loaded synchronously, so it should avoid relying on async workers to get the container ready. 13388
ImageCacheKey.cpp static 5047
ImageCacheKey.h ImageCacheKey is the key type for the image cache (see imgLoader.h). 2674
ImageFactory.cpp static 8661
ImageFactory.h Registers vars with Preferences. Should only be called on the main thread. 3213
ImageLogging.h const char * constructor 4607
ImageMetadata.h 3267
ImageOps.cpp static 7323
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
ImageURL.h ImageURL nsStandardURL is not threadsafe, so this class is created to hold only the necessary URL data required for image loading and decoding. Note: Although several APIs have the same or similar prototypes as those found in nsIURI/nsStandardURL, the class does not implement nsIURI. This is intentional; functionality is limited, and is only useful for imagelib code. By not implementing nsIURI, external code cannot unintentionally be given an nsIURI pointer with this limited class behind it; instead, conversion to a fully implemented nsIURI is required (e.g. through NS_NewURI). 4249
ImageWrapper.cpp 8814
ImageWrapper.h Abstract superclass for Images that wrap other Images. 2717
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. 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(). 3887
imgFrame.cpp 27059
imgFrame.h AnimationData contains all of the information necessary for using an imgFrame as part of an animation. It includes pointers to the raw image data of the underlying imgFrame, but does not own that data. A RawAccessFrameRef for the underlying imgFrame must outlive the AnimationData for it to remain valid. 16344
imgICache.idl imgICache interface @author Stuart Parmenter <> @version 0.1 @see imagelib2 2421
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. 26498
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 7245
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. 6875
imgLoader.cpp aIsUsed = 103712
imgLoader.h stabilize 17654
imgRequest.cpp 40184
imgRequest.h 10502
imgRequestProxy.cpp member initializers and constructor code 39155
imgRequestProxy.h 20557898-1dd2-11b2-8f65-9c462ee2bc95 8529
imgTools.cpp ========== imgITools implementation ========== 16265
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. 10610
LookupResult.h LookupResult is the return type of SurfaceCache's Lookup*() functions. It combines a surface with relevant metadata tracked by SurfaceCache. 4408 3202
MultipartImage.cpp 10096
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 12290
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. 3233
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 18119
ProgressTracker.h Image progress bitflags. See CheckProgressConsistency() for the invariants we enforce about the ordering dependencies betweeen these flags. 9214
RasterImage.cpp RasterImage::RasterImage(ImageURL* aURI /* = nullptr 53075
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 <> 17929
ScriptedNotificationObserver.cpp aUnused 2458
ScriptedNotificationObserver.h 1098
ShutdownTracker.cpp static 1990
ShutdownTracker.h ShutdownTracker is an imagelib-global service that allows callers to check whether shutdown has started. 1407
SourceBuffer.cpp 20444
SourceBuffer.h SourceBuffer is a single producer, multiple consumer data structure used for storing image source (compressed) data. 17356
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. 32390
SurfaceCache.cpp SurfaceCache is a service for caching temporary surfaces in imagelib. 55478
SurfaceCache.h SurfaceCache is a service for caching temporary surfaces and decoded image data in imagelib. 18478
SurfaceCacheUtils.cpp static 515
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. 32902
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 4828
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. 27864
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. 9918
SVGDocumentWrapper.cpp 12554
SVGDocumentWrapper.h This class wraps an SVG document, for use by VectorImage objects. 4273
SVGDrawingParameters.h 1865
test 7
VectorImage.cpp 47127
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, 6185