Name Description Size Coverage
2D.h This structure is used to send draw options that are universal to all drawing operations. 90205 -
AutoHelpersWin.h 1611 -
BaseCoord.h Do not use this class directly. Subclass it, pass that subclass as the Sub parameter, and only use that subclass. This allows methods to safely cast 'this' to 'Sub*'. 3408 -
BaseMargin.h Sides represents a set of physical sides. 5501 -
BasePoint.h Do not use this class directly. Subclass it, pass that subclass as the Sub parameter, and only use that subclass. This allows methods to safely cast 'this' to 'Sub*'. 4050 -
BasePoint3D.h Do not use this class directly. Subclass it, pass that subclass as the Sub parameter, and only use that subclass. This allows methods to safely cast 'this' to 'Sub*'. 3640 -
BasePoint4D.h Do not use this class directly. Subclass it, pass that subclass as the Sub parameter, and only use that subclass. This allows methods to safely cast 'this' to 'Sub*'. 3387 -
BaseRect.h Rectangles have two interpretations: a set of (zero-size) points, and a rectangular area of the plane. Most rectangle operations behave the same no matter what interpretation is being used, but some operations differ: -- Equality tests behave differently. When a rectangle represents an area, all zero-width and zero-height rectangles are equal to each other since they represent the empty area. But when a rectangle represents a set of mathematical points, zero-width and zero-height rectangles can be unequal. -- The union operation can behave differently. When rectangles represent areas, taking the union of a zero-width or zero-height rectangle with another rectangle can just ignore the empty rectangle. But when rectangles represent sets of mathematical points, we may need to extend the latter rectangle to include the points of a zero-width or zero-height rectangle. To ensure that these interpretations are explicitly disambiguated, we deny access to the == and != operators and require use of IsEqualEdges and IsEqualInterior instead. Similarly we provide separate Union and UnionEdges methods. Do not use this class directly. Subclass it, pass that subclass as the Sub parameter, and only use that subclass. 28064 -
BaseSize.h Do not use this class directly. Subclass it, pass that subclass as the Sub parameter, and only use that subclass. This allows methods to safely cast 'this' to 'Sub*'. 3410 -
BezierUtils.cpp 11045 -
BezierUtils.h 5493 -
BigEndianInts.h 1680 -
Blur.cpp 12843 -
Blur.h Implementation of a Gaussian blur. A Gaussian blur is good for blurring because, when done independently in the horizontal and vertical directions, it matches the result that would be obtained using a different (rotated) set of axes. This is a "service" class; the constructors set up all the information based on the values. The callers are responsible for creating and managing the backing surface and passing the pointer to the data to the Blur() method. This class does not retain the pointer to the data outside of the Blur() call. A spread N makes each output pixel the maximum value of all source pixels within a square of side length 2N+1 centered on the output pixel. 6218 -
BorrowedContext.h This is a helper class that let's you borrow a CGContextRef from a DrawTargetCG. This is used for drawing themed widgets. Callers should check the cg member after constructing the object to see if it succeeded. The DrawTarget should not be used while the context is borrowed. 2203 -
BufferEdgePad.cpp 3508 -
BufferEdgePad.h 691 -
BufferUnrotate.cpp 2427 -
BufferUnrotate.h 689 -
ConvolutionFilter.cpp 4138 -
ConvolutionFilter.h MOZILLA_GFX_CONVOLUTION_FILTER_H_ 1631 -
ConvolutionFilterAVX2.cpp 4381 -
ConvolutionFilterNEON.cpp hasAlpha 11953 -
ConvolutionFilterSSE2.cpp hasAlpha 12908 -
Coord.h 7451 -
CriticalSection.h 1810 -
DataSourceSurface.cpp 678 -
DataSourceSurfaceWrapper.h MOZILLA_GFX_DATASOURCESURFACEWRAPPER_H_ 1760 -
DataSurfaceHelpers.cpp 11363 -
DataSurfaceHelpers.h Create a DataSourceSurface and init the surface with the |aData|. The stride of this source surface might be different from the input data's |aDataStride|. System will try to use the optimal one. 5037 -
DrawEventRecorder.cpp 6027 -
DrawEventRecorder.h This is a combination of HasStoredObject and AddStoredObject, so that we only have to call ProcessPendingDeletions once, which involves locking. @param aObject the object to store if not already stored @return true if the object was not already stored, false if it was 10976 -
DrawEventRecorderTypes.h MOZILLA_GFX_DRAWEVENTRECORDERTYPES_H_ 942 -
DrawTarget.cpp Byte offsets of channels in a native packed gfxColor or cairo image surface. 13849 -
DrawTargetCairo.cpp Clamp r to (0,0) (2^23,2^23) these are to be device coordinates. Returns false if the rectangle is completely out of bounds, true otherwise. This function assumes that it will be called with a rectangle being drawn into a surface with an identity transformation matrix; that is, anything above or to the left of (0,0) will be offscreen. First it checks if the rectangle is entirely beyond CAIRO_COORD_MAX; if so, it can't ever appear on the screen -- false is returned. Then it shifts any rectangles with x/y < 0 so that x and y are = 0, and adjusts the width and height appropriately. For example, a rectangle from (0,-5) with dimensions (5,10) will become a rectangle from (0,0) with dimensions (5,5). If after negative x/y adjustment to 0, either the width or height is negative, then the rectangle is completely offscreen, and nothing is drawn -- false is returned. Finally, if x+width or y+height are greater than CAIRO_COORD_MAX, the width and height are clamped such x+width or y+height are equal to CAIRO_COORD_MAX, and true is returned. 68451 -
DrawTargetCairo.h 10448 -
DrawTargetOffset.cpp 9007 -
DrawTargetOffset.h Not implemented 8187 -
DrawTargetRecording.cpp 36564 -
DrawTargetRecording.h Draw a surface to the draw target. Possibly doing partial drawing or applying scaling. No sampling happens outside the source. aSurface Source surface to draw aDest Destination rectangle that this drawing operation should draw to aSource Source rectangle in aSurface coordinates, this area of aSurface will be stretched to the size of aDest. aOptions General draw options that are applied to the operation aSurfOptions DrawSurface options that are applied 18533 -
DrawTargetSkia.cpp When constructing a temporary SkImage via GetSkImageForSurface, we may also have to construct a temporary DataSourceSurface, which must live as long as the SkImage. We attach this temporary surface to the image's pixelref, so that it can be released once the pixelref is freed. 74630 -
DrawTargetSkia.h 9738 -
DWriteSettings.cpp static 5642 -
DWriteSettings.h 1077 -
Factory.cpp 39254 -
FilterNodeSoftware.cpp This class provides a way to get a pow() results in constant-time. It works by caching 257 ((1 << sCacheIndexPrecisionBits) + 1) values for bases between 0 and 1 and a fixed exponent. 123992 -
FilterNodeSoftware.h Can be attached to FilterNodeSoftware instances using AddInvalidationListener. FilterInvalidated is called whenever the output of the observed filter may have changed; that is, whenever cached GetOutput() results (and results derived from them) need to discarded. 30051 -
FilterProcessing.cpp 6386 -
FilterProcessing.h 8913 -
FilterProcessingScalar.cpp 8632 -
FilterProcessingSIMD-inl.h 52349 -
FilterProcessingSSE2.cpp 4133 -
Filters.h 13894 -
FontFeature.h 1000 -
FontVariation.h MOZILLA_GFX_FONTVARIATION_H_ 816 -
GenericRefCounted.h Common base class for GenericRefCounted and GenericAtomicRefCounted. Having this shared base class, common to both the atomic and non-atomic cases, allows to have RefPtr's that don't care about whether the objects they're managing have atomic refcounts or not. 3778 -
gfx2d.sln 1494 -
gfx2d.vcxproj 5838 -
Helpers.h 1775 -
HelpersCairo.h 10339 -
HelpersSkia.h 12835 -
HelpersWin.h MOZILLA_GFX_HELPERSWIN_H_ 1153 -
HelpersWinFonts.h 1035 -
ImageScaling.cpp The surface we sample from might not be even sized, if it's not we will ignore the last row/column. This means we lose some data but it keeps the code very simple. There's also no perfect answer that provides a better solution. 8022 -
ImageScaling.h 3059 -
ImageScalingSSE2.cpp The functions below use the following system for averaging 4 pixels: The first observation is that a half-adder is implemented as follows: R = S + 2C or in the case of a and b (a ^ b) + ((a & b) << 1); This can be trivially extended to three pixels by observaring that when doing (a ^ b ^ c) as the sum, the carry is simply the bitwise-or of the carries of the individual numbers, since the sum of 3 bits can only ever have a carry of one. We then observe that the average is then ((carry << 1) + sum) >> 1, or, assuming eliminating overflows and underflows, carry + (sum >> 1). We now average our existing sum with the fourth number, so we get: sum2 = (sum + d) >> 1 or (sum >> 1) + (d >> 1). We now observe that our sum has been moved into place relative to the carry, so we can now average with the carry to get the final 4 input average: avg = (sum2 + carry) >> 1; Or to reverse the proof: avg = ((sum >> 1) + carry + d >> 1) >> 1 avg = ((a + b + c) >> 1 + d >> 1) >> 1 avg = ((a + b + c + d) >> 2) An additional fact used in the SSE versions is the concept that we can trivially convert a rounded average to a truncated average: We have: f(a, b) = (a + b + 1) >> 1 And want: g(a, b) = (a + b) >> 1 Observe: ~f(~a, ~b) == ~((~a + ~b + 1) >> 1) == ~((-a - 1 + -b - 1 + 1) >> 1) == ~((-a - 1 + -b) >> 1) == ~((-(a + b) - 1) >> 1) == ~((~(a + b)) >> 1) == (a + b) >> 1 == g(a, b) 12890 -
InlineTranslator.cpp 2694 -
InlineTranslator.h 6222 -
IterableArena.h 5037 -
Logging.h 30859 -
LoggingConstants.h MOZILLA_GFX_LOGGING_CONSTANTS_H_ 1004 -
LuminanceNEON.cpp Byte offsets of channels in a native packed gfxColor or cairo image surface. 3320 -
LuminanceNEON.h LUMINANCENEON_H_ 761 -
MacIOSurface.cpp static 27711 -
MacIOSurface.h 6908 -
Matrix.cpp Force small values to zero. We do this to avoid having sin(360deg) evaluate to a tiny but nonzero value. 5797 -
Matrix.h In most cases you probably want to use TransformBounds. This function just transforms the top-left and size separately and constructs a rect from those results. 82092 -
MatrixFwd.h 1132 -
MMIHelpers.h ============================================================================ Name : MMIHelpers.h Author : Heiher <r@hev.cc> Version : 0.0.1 Copyright : Copyright (c) 2015 everyone. Description : The helpers for x86 SSE to Loongson MMI. ============================================================================ 8384 -
moz.build 5528 -
NativeFontResource.cpp 1940 -
NativeFontResourceDWrite.cpp Important! Note the key here has to be a uint64_t that will have been generated by incrementing sNextFontFileKey. 8398 -
NativeFontResourceDWrite.h Creates a NativeFontResourceDWrite if data is valid. Note aFontData will be copied if required and so can be released after calling. @param aFontData the SFNT data. @param aDataLength length of data. @return Referenced NativeFontResourceDWrite or nullptr if invalid. 2021 -
NativeFontResourceFreeType.cpp 3417 -
NativeFontResourceFreeType.h 2603 -
NativeFontResourceGDI.cpp static 1677 -
NativeFontResourceGDI.h Creates a NativeFontResourceGDI if data is valid. Note aFontData will be copied if required and so can be released after calling. @param aFontData the SFNT data. @param aDataLength length of data. @return Referenced NativeFontResourceGDI or nullptr if invalid. 1592 -
NativeFontResourceMac.cpp static 5367 -
NativeFontResourceMac.h 1487 -
NumericTools.h MOZILLA_GFX_NUMERICTOOLS_H_ 1428 -
Path.cpp 18290 -
PathAnalysis.h 1959 -
PathCairo.cpp 9483 -
PathCairo.h MOZILLA_GFX_PATH_CAIRO_H_ 3258 -
PathHelpers.cpp 10629 -
PathHelpers.h Draws a partial arc <= 90 degrees given exact start and end points. Assumes that it is continuing from an already specified start point. 14656 -
PathRecording.cpp 14652 -
PathRecording.h Move the current point in the path, any figure currently being drawn will be considered closed during fill operations, however when stroking the closing line segment will not be drawn. 7854 -
PathSkia.cpp 9657 -
PathSkia.h MOZILLA_GFX_PATH_SKIA_H_ 3759 -
PatternHelpers.h This class is used to allow general pattern creation functions to return any type of pattern via an out-paramater without allocating a pattern instance on the free-store (an instance of this class being created on the stack before passing it in to the creation function). Without this class writing pattern creation functions would be a pain since Pattern objects are not reference counted, making lifetime management of instances created on the free-store and returned from a creation function hazardous. Besides that, in the case that ColorPattern's are expected to be common, it is particularly desirable to avoid the overhead of allocating on the free-store. 5170 -
Point.h 14648 -
Polygon.h Calculates the w = 0 intersection point for the edge defined by |aFirst| and |aSecond|. 12320 -
Quaternion.cpp 702 -
Quaternion.h 3804 -
RecordedEvent.cpp static 6862 -
RecordedEvent.h 19064 -
RecordedEventImpl.h 143146 -
RecordingTypes.h MOZILLA_GFX_RECORDINGTYPES_H_ 3047 -
Rect.h 20629 -
RectAbsolute.h A RectAbsolute is similar to a Rect (see BaseRect.h), but represented as (x1, y1, x2, y2) instead of (x, y, width, height). Unless otherwise indicated, methods on this class correspond to methods on BaseRect. The API is currently very bare-bones; it may be extended as needed. Do not use this class directly. Subclass it, pass that subclass as the Sub parameter, and only use that subclass. 11653 -
Scale.h Scale an image using a high-quality filter. Synchronously scales an image and writes the output to the destination in 32-bit format. The destination must be pre-allocated by the caller. Returns true if scaling was successful, and false otherwise. Currently, this function is implemented using Skia. If Skia is not enabled when building, calling this function will always return false. IMPLEMTATION NOTES: This API is not currently easily hardware acceleratable. A better API might take a SourceSurface and return a SourceSurface; the Direct2D backend, for example, could simply set a status bit on a copy of the image, and use Direct2D's high-quality scaler at draw time. 1499 -
ScaledFontBase.cpp 7014 -
ScaledFontBase.h MOZILLA_GFX_SCALEDFONTBASE_H_ 1951 -
ScaledFontDWrite.cpp 22125 -
ScaledFontDWrite.h MOZILLA_GFX_SCALEDFONTDWRITE_H_ 3137 -
ScaledFontFontconfig.cpp 17854 -
ScaledFontFontconfig.h MOZILLA_GFX_SCALEDFONTFONTCONFIG_H_ 2764 -
ScaledFontFreeType.cpp 4512 -
ScaledFontFreeType.h MOZILLA_GFX_SCALEDFONTCAIRO_H_ 2170 -
ScaledFontMac.cpp 29081 -
ScaledFontMac.h MOZILLA_GFX_SCALEDFONTMAC_H_ 3466 -
ScaledFontWin.cpp 3960 -
ScaledFontWin.h MOZILLA_GFX_SCALEDFONTWIN_H_ 1328 -
ScaleFactor.h This class represents a scaling factor between two different pixel unit systems. This is effectively a type-safe float, intended to be used in combination with the known-type instances of gfx::Point, gfx::Rect, etc. This class is meant to be used in cases where a single scale applies to both the x and y axes. For cases where two diferent scales apply, use ScaleFactors2D. 2875 -
ScaleFactors2D.h This class is like ScaleFactor, but allows different scales on the x and y axes. 7089 -
SFNTData.cpp static 6322 -
SFNTData.h Creates an SFNTData if the header is a format that we understand and aDataLength is sufficient for the length information in the header data. Note that the data is NOT copied, so must exist the SFNTData's lifetime. @param aFontData the SFNT data. @param aDataLength length @return UniquePtr to a SFNTData or nullptr if the header is invalid. 1758 -
SIMD.h Consumers of this file need to #define SIMD_COMPILE_SSE2 before including it if they want access to the SSE2 functions. 34573 -
SkConvolver.cpp 26681 -
SkConvolver.h 6247 -
SourceSurfaceCairo.cpp = nullptr 3990 -
SourceSurfaceCairo.h 2237 -
SourceSurfaceD3D11.cpp static 2149 -
SourceSurfaceD3D11.h MOZILLA_GFX_SourceSurfaceD3D11_H_ 1957 -
SourceSurfaceRawData.cpp static 3805 -
SourceSurfaceRawData.h MOZILLA_GFX_SOURCESURFACERAWDATA_H_ 4166 -
SourceSurfaceSkia.cpp 7482 -
SourceSurfaceSkia.h The caller is responsible for ensuring aMappedSurface is not null. 2148 -
SSEHelpers.h Before Nehalem _mm_loadu_si128 could be very slow, this trick is a little faster. Once enough people are on architectures where _mm_loadu_si128 is fast we can migrate to it. 940 -
StackArray.h A handy class that will allocate data for size*T objects on the stack and otherwise allocate them on the heap. It is similar in purpose to AutoTArray 1066 -
SVGTurbulenceRenderer-inl.h The turbulence calculation code is an adapted version of what appears in the SVG 1.1 specification: http://www.w3.org/TR/SVG11/filters.html#feTurbulence 13433 -
Swizzle.cpp Convenience macros for dispatching to various format combinations. 64516 -
Swizzle.h Premultiplies source and writes it to destination. Source and destination may be the same to premultiply in-place. The source format must have an alpha channel. 4250 -
SwizzleAVX2.cpp 3274 -
SwizzleNEON.cpp 18433 -
SwizzleSSE2.cpp 16370 -
SwizzleSSSE3.cpp 2219 -
Tools.h 6053 -
Triangle.h A simple triangle data structure. 1771 -
Types.cpp 3108 -
Types.h Data surface - bitmap in memory 35967 -
unittest -
UnscaledFontDWrite.h MOZILLA_GFX_UNSCALEDFONTDWRITE_H_ 2077 -
UnscaledFontFreeType.cpp 7858 -
UnscaledFontFreeType.h MOZILLA_GFX_UNSCALEDFONTFREETYPE_H_ 4326 -
UnscaledFontGDI.h MOZILLA_GFX_UNSCALEDFONTGDI_H_ 1520 -
UnscaledFontMac.h MOZILLA_GFX_UNSCALEDFONTMAC_H_ 3417 -
UserData.h this class is basically a clone of the user data concept from cairo 5612 -