2D.h 
This structure is used to send draw options that are universal to all drawing
operations.

85684 
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*'.

3440 
BaseMargin.h 
Sides represents a set of physical sides.

5247 
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*'.

3528 
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 (zerosize) 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 zerowidth and zeroheight rectangles are equal to each other since they
represent the empty area. But when a rectangle represents a set of
mathematical points, zerowidth and zeroheight rectangles can be unequal.
 The union operation can behave differently. When rectangles represent
areas, taking the union of a zerowidth or zeroheight 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 zerowidth or zeroheight 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.

27763 
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 
Helper function to process each row of the box blur.
It takes care of transposing the data on input or output depending
on whether we intend a horizontal or vertical blur, and whether we're
reading from the initial source or writing to the final destination.
It allows starting or ending anywhere within the row to accomodate
a skip rect.

32201 
Blur.h 
Implementation of a triple box blur approximation 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. A triple
box blur is a very close approximation of a Gaussian.
This is a "service" class; the constructors set up all the information
based on the values and compute the minimum size for an 8bit alpha
channel context.
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.

6593 
BlurLS3.cpp 

20656 
BlurNEON.cpp 

12072 
BlurSSE2.cpp 

13737 
BorrowedContext.h 
This is a helper class that let's you borrow an Xlib drawable from
a DrawTarget. This is used for drawing themed widgets.
Callers should check the Xlib drawable after constructing the object
to see if it succeeded. The DrawTarget should not be used while
the drawable is borrowed. 
3899 
BufferEdgePad.cpp 

3508 
BufferEdgePad.h 

691 
BufferUnrotate.cpp 

2485 
BufferUnrotate.h 

697 
ConicGradientEffectD2D1.cpp 

11606 
ConicGradientEffectD2D1.h 

3556 
ConvolutionFilter.cpp 

4155 
ConvolutionFilter.h 
MOZILLA_GFX_CONVOLUTION_FILTER_H_ 
1544 
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 

11434 
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.

5040 
DrawEventRecorder.cpp 

6318 
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

10187 
DrawTarget.cpp 
Byte offsets of channels in a native packed gfxColor or cairo image surface.

12599 
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.

65143 
DrawTargetCairo.h 

10258 
DrawTargetD2D1.cpp 

80328 
DrawTargetD2D1.h 

13798 
DrawTargetOffset.cpp 

9007 
DrawTargetOffset.h 
Not implemented 
7965 
DrawTargetRecording.cpp 

34339 
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

16178 
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.

71693 
DrawTargetSkia.h 

9202 
DWriteSettings.cpp 
static 
5517 
DWriteSettings.h 

1077 
ExtendInputEffectD2D1.cpp 

6078 
ExtendInputEffectD2D1.h 

3299 
Factory.cpp 

42442 
FilterNodeD2D1.cpp 

41250 
FilterNodeD2D1.h 

5611 
FilterNodeSoftware.cpp 
This class provides a way to get a pow() results in constanttime. It works
by caching 129 ((1 << sCacheIndexPrecisionBits) + 1) values for bases between
0 and 1 and a fixed exponent.

125289 
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.

29956 
FilterProcessing.cpp 

11111 
FilterProcessing.h 

11531 
FilterProcessingScalar.cpp 

12622 
FilterProcessingSIMDinl.h 

57584 
FilterProcessingSSE2.cpp 

5672 
Filters.h 

13867 
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 nonatomic
cases, allows to have RefPtr's that don't care about whether the
objects they're managing have atomic refcounts or not.

3778 
genshaders.sh 

694 
gfx2d.sln 

1494 
gfx2d.vcxproj 

6646 
GradientStopsD2D.h 
MOZILLA_GFX_GRADIENTSTOPSD2D_H_ 
1210 
Helpers.h 

1775 
HelpersCairo.h 

10124 
HelpersD2D.h 

31873 
HelpersSkia.h 

12443 
HelpersWinFonts.h 

928 
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 

3079 
ImageScalingSSE2.cpp 
The functions below use the following system for averaging 4 pixels:
The first observation is that a halfadder 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 bitwiseor 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 

6082 
IterableArena.h 

5074 
Logging.h 

29436 
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__ 
770 
MacIOSurface.cpp 
static 
24069 
MacIOSurface.h 

6404 
Matrix.cpp 
Force small values to zero. We do this to avoid having sin(360deg)
evaluate to a tiny but nonzero value.

5818 
Matrix.h 
In most cases you probably want to use TransformBounds. This function
just transforms the topleft and size separately and constructs a rect
from those results.

79497 
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.
============================================================================

8393 
moz.build 

5903 
NativeFontResource.cpp 

1940 
NativeFontResourceDWrite.cpp 
Important! Note the key here has to be a uint64_t that will have been
generated by incrementing sNextFontFileKey.

8364 
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.

2015 
NativeFontResourceFreeType.cpp 

3331 
NativeFontResourceFreeType.h 

2585 
NativeFontResourceGDI.cpp 
static 
1663 
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.

1663 
NativeFontResourceMac.cpp 
static 
5369 
NativeFontResourceMac.h 

1530 
NumericTools.h 
MOZILLA_GFX_NUMERICTOOLS_H_ 
1428 
Path.cpp 

18290 
PathAnalysis.h 

1861 
PathCairo.cpp 

9483 
PathCairo.h 
MOZILLA_GFX_PATH_CAIRO_H_ 
3258 
PathD2D.cpp 
Should never be called! 
13072 
PathD2D.h 
MOZILLA_GFX_PATHD2D_H_ 
3734 
PathHelpers.cpp 

10620 
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.

15086 
PathRecording.cpp 

11461 
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.

7369 
PathSkia.cpp 

8766 
PathSkia.h 
MOZILLA_GFX_PATH_SKIA_H_ 
3540 
PatternHelpers.h 
This class is used to allow general pattern creation functions to return
any type of pattern via an outparamater without allocating a pattern
instance on the freestore (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 freestore 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
freestore.

5173 
Point.h 

14142 
Polygon.h 
Calculates the w = 0 intersection point for the edge defined by
aFirst and aSecond.

12320 
Quaternion.cpp 

723 
Quaternion.h 

3867 
RadialGradientEffectD2D1.cpp 

12463 
RadialGradientEffectD2D1.h 

3572 
RecordedEvent.cpp 
static 
6736 
RecordedEvent.h 
Get GradientStops compatible with the translation DrawTarget type.
@param aRawStops array of raw gradient stops required
@param aNumStops length of aRawStops
@param aExtendMode extend mode required
@return an already addrefed GradientStops for our DrawTarget type

15788 
RecordedEventImpl.h 

134283 
RecordingTypes.h 
MOZILLA_GFX_RECORDINGTYPES_H_ 
2723 
Rect.h 

17673 
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 barebones; 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 highquality filter.
Synchronously scales an image and writes the output to the destination in
32bit format. The destination must be preallocated 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 highquality scaler at draw time.

1499 
ScaledFontBase.cpp 

7012 
ScaledFontBase.h 
MOZILLA_GFX_SCALEDFONTBASE_H_ 
1951 
ScaledFontDWrite.cpp 

24263 
ScaledFontDWrite.h 
MOZILLA_GFX_SCALEDFONTDWRITE_H_ 
3572 
ScaledFontFontconfig.cpp 

18333 
ScaledFontFontconfig.h 
MOZILLA_GFX_SCALEDFONTFONTCONFIG_H_ 
2764 
ScaledFontFreeType.cpp 

4507 
ScaledFontFreeType.h 
MOZILLA_GFX_SCALEDFONTCAIRO_H_ 
2170 
ScaledFontMac.cpp 

29032 
ScaledFontMac.h 
MOZILLA_GFX_SCALEDFONTMAC_H_ 
3403 
ScaledFontWin.cpp 

3950 
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 typesafe float, intended to be used in
combination with the knowntype 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.

2908 
ScaleFactors2D.h 
This class is like ScaleFactor, but allows different scales on the x and
y axes.

7121 
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 
ShadersD2D.fx 

26023 
ShadersD2D.h 
21 
654572 
ShadersD2D1.h 

67167 
ShadersD2D1.hlsl 

6338 
SIMD.h 
Consumers of this file need to #define SIMD_COMPILE_SSE2 before including it
if they want access to the SSE2 functions.

34576 
SkConvolver.cpp 

23077 
SkConvolver.h 

6116 
SourceSurfaceCairo.cpp 
= nullptr 
3990 
SourceSurfaceCairo.h 

2240 
SourceSurfaceD2D1.cpp 

6809 
SourceSurfaceD2D1.h 
MOZILLA_GFX_SOURCESURFACED2D2TARGET_H_ 
3184 
SourceSurfaceRawData.cpp 
actually an object count 
2403 
SourceSurfaceRawData.h 
MOZILLA_GFX_SOURCESURFACERAWDATA_H_ 
4204 
SourceSurfaceSkia.cpp 

7264 
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.

848 
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

959 
SVGTurbulenceRendererinl.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

13296 
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 inplace. 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 

2514 
Types.h 
Data surface  bitmap in memory 
31161 
unittest 


UnscaledFontDWrite.h 
MOZILLA_GFX_UNSCALEDFONTDWRITE_H_ 
2022 
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 