Name Description Size
cairo-xlib-utils.h This callback encapsulates Xlib-based rendering. We assume that the execution of the callback is equivalent to compositing some RGBA image of size (bounds_width, bounds_height) onto the drawable at offset (offset_x, offset_y), clipped to the union of the clip_rects if num_rects is greater than zero. This includes the assumption that the same RGBA image is composited if you call the callback multiple times with the same closure, display and visual during a single cairo_draw_with_xlib call. @return True on success, False on non-recoverable error 5112
CJKCompatSVS.cpp 38145
D3D11Checks.cpp static 16470
D3D11Checks.h 1574
d3dkmtQueryStatistics.h This file is based on a header file that was briefly seen in the Windows 8 RC SDK. The work for this file itself was based on the one in ProcessHacker at For more details see Mozilla Bug 689870. [Bug 917496 indicates that some of these structs may not match reality, and therefore should not be trusted. See the reference to bug 917496 in gfxWindowsPlatform.cpp.] 3708
DeviceManagerDx.cpp static 39501
DeviceManagerDx.h 6327
DisplayConfigWindows.cpp 3052
DisplayConfigWindows.h 796
DrawMode.h 959 // Generated by %s. Do not edit. #include <stdint.h> #define U16(v) (((v) >> 8) & 0xFF), ((v) & 0xFF) #define U24(v) (((v) >> 16) & 0xFF), (((v) >> 8) & 0xFF), ((v) & 0xFF) #define U32(v) (((v) >> 24) & 0xFF), (((v) >> 16) & 0xFF), (((v) >> 8) & 0xFF), ((v) & 0xFF) #define GLYPH(v) U16(v >= 0x2F800 ? (v) - (0x2F800 - 0xFB00) : (v)) // Fallback mappings for CJK Compatibility Ideographs Standardized Variants // taken from %s. // Using OpenType format 14 cmap subtable structure to reuse the lookup code // for fonts. The glyphID field is used to store the corresponding codepoints // CJK Compatibility Ideographs. To fit codepoints into the 16-bit glyphID // field, CJK Compatibility Ideographs Supplement (U+2F800..U+2FA1F) will be // mapped to 0xFB00..0xFD1F. extern const uint8_t sCJKCompatSVSTable[] = { 2784 2222
gfx2DGlue.h 3473
gfxAlphaRecovery.cpp static 1734
gfxAlphaRecovery.h Some SIMD fast-paths only can be taken if the relative byte-alignment of images' pointers and strides meets certain criteria. Aligning image pointers and strides by |GoodAlignmentLog2()| below will ensure that fast-paths aren't skipped because of misalignment. Fast-paths may still be taken even if GoodAlignmentLog2() is not met, in some conditions. 4832
gfxAlphaRecoverySSE2.cpp 9885
gfxAndroidPlatform.cpp 12138
gfxAndroidPlatform.h GFX_PLATFORM_ANDROID_H 1771
gfxASurface.cpp Do we already have a wrapper for this surface? 15576
gfxASurface.h A surface is something you can draw on. Instantiate a subclass of this abstract class, and use gfxContext to draw on this surface. 5976
gfxBaseSharedMemorySurface.cpp 422
gfxBaseSharedMemorySurface.h Return a new gfxSharedImageSurface around a shmem segment newly allocated by this function. |aAllocator| is the object used to allocate the new shmem segment. Null is returned if creating the surface failed. NB: the *caller* is responsible for freeing the Shmem allocated by this function. 5718
gfxBlur.cpp 48770
gfxBlur.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. Creates an 8-bit alpha channel context for callers to draw in, spreads the contents of that context, blurs the contents, and applies it as an alpha mask on a different existing context. 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. A temporary surface is created in the Init function. The caller then draws any desired content onto the context acquired through GetContext, and lastly calls Paint to apply the blurred content as an alpha mask. 8099
gfxColor.h Fast approximate division by 255. It has the property that for all 0 <= n <= 255*255, GFX_DIVIDE_BY_255(n) == n/255. But it only uses two adds and two shifts instead of an integer division (which is expensive on many processors). equivalent to ((v)/255) 2152
gfxContext.cpp static 26918
gfxContext.h This is the main class for doing actual drawing. It is initialized using a surface and can be drawn on. It manages various state information like a current transformation matrix (CTM), a current path, current color, etc. All drawing happens by creating a path and then stroking or filling it. The functions like Rectangle and Arc do not do any drawing themselves. When a path is drawn (stroked or filled), it is filled/stroked with a pattern set by SetPattern or SetColor. Note that the gfxContext takes coordinates in device pixels, as opposed to app units. 19788
gfxCoreTextShaper.cpp 25925
gfxCoreTextShaper.h GFX_CORETEXTSHAPER_H 2458
gfxDrawable.cpp 8002
gfxDrawable.h gfxDrawable An Interface representing something that has an intrinsic size and can draw itself repeatedly. 6163
gfxDWriteCommon.cpp Used by the FontFileLoader to create a new font stream, this font stream is created from data in memory. The memory passed may be released after object creation, it will be copied internally. @param aData Font data 6505
gfxDWriteCommon.h Important! Note the key here -has- to be a pointer to a uint64_t. 4944
gfxDWriteFontList.cpp 86343
gfxDWriteFontList.h \brief Class representing directwrite font family. gfxDWriteFontFamily is a class that describes one of the font families on the user's system. It holds each gfxDWriteFontEntry (maps more directly to a font face) which holds font type, charset info and character map info. 16968
gfxDWriteFonts.cpp 23711
gfxDWriteFonts.h \brief Class representing a font face for a font entry. 3407
gfxEnv.h GFX_ENV_H 4898
gfxFailure.h 712
gfxFcPlatformFontList.cpp String 95329
gfxFcPlatformFontList.h 14666
gfxFont.cpp gfxFontCache - global cache of gfxFont instances. Expires unused fonts after a short interval; notifies fonts to age their cached shaped-word records; observes memory-pressure notification and tells fonts to clear their shaped-word caches to free up memory. 157727
gfxFont.h 89664
gfxFontConstants.h font constants shared by both thebes and layout 7210
gfxFontEntry.cpp 75816
gfxFontEntry.h 41924
gfxFontFeatures.cpp 1734
gfxFontFeatures.h 3381
gfxFontInfoLoader.cpp 10178
gfxFontInfoLoader.h 6423
gfxFontMissingGlyphs.cpp Parameters that control the rendering of hexboxes. They look like this: BMP codepoints non-BMP codepoints (U+0000 - U+FFFF) (U+10000 - U+10FFFF) +---------+ +-------------+ | | | | | HHH HHH | | HHH HHH HHH | | HHH HHH | | HHH HHH HHH | | HHH HHH | | HHH HHH HHH | | HHH HHH | | HHH HHH HHH | | HHH HHH | | HHH HHH HHH | | | | | | HHH HHH | | HHH HHH HHH | | HHH HHH | | HHH HHH HHH | | HHH HHH | | HHH HHH HHH | | HHH HHH | | HHH HHH HHH | | HHH HHH | | HHH HHH HHH | | | | | +---------+ +-------------+ 19299
gfxFontMissingGlyphs.h This class should not be instantiated. It's just a container for some helper functions. 2002
gfxFontPrefLangList.h 1730
gfxFontSrcPrincipal.cpp 1593
gfxFontSrcPrincipal.h A wrapper for an nsIPrincipal that can be used OMT, which has cached information useful for the gfxUserFontSet. 1479
gfxFontSrcURI.cpp 2884
gfxFontSrcURI.h A wrapper for an nsIURI that can be used OMT, which has cached information useful for the gfxUserFontSet. 1897
gfxFontUtils.cpp 67711
gfxFontUtils.h Bug 341128 - w32api defines min/max which causes problems with <bitset> 51305
gfxFontVariations.h 1209
gfxFT2FontBase.cpp 30139
gfxFT2FontBase.h 5849
gfxFT2FontList.cpp 63465
gfxFT2FontList.h Append this face's metadata to aFaceList for storage in the FontNameCache (for faster startup). The aPSName and aFullName parameters here can in principle be empty, but if they are missing for a given face then src:local() lookups will not be able to find it when the shared font list is in use. 9019
gfxFT2Fonts.cpp gfxFT2Font 7794
gfxFT2Fonts.h GFX_FT2FONTS_H 2632
gfxFT2Utils.cpp static 5109
gfxFT2Utils.h BEWARE: Recursively locking with gfxFT2LockedFace is not supported. Do not instantiate gfxFT2LockedFace within the scope of another instance. Do not attempt to call into Cairo within the scope of gfxFT2LockedFace, as that may accidentally try to re-lock the face within Cairo itself and thus deadlock. 2568
gfxGDIFont.cpp 20086
gfxGDIFont.h override Measure to add padding for antialiasing 3364
gfxGDIFontList.cpp GDIFontEntry 37036
gfxGDIFontList.h List of different types of fonts we support on Windows. These can generally be lumped in to 3 categories where we have to do special things: Really old fonts bitmap and vector fonts (device and raster), Type 1 fonts, and TrueType/OpenType fonts. This list is sorted in order from least prefered to most prefered. We prefer Type1 fonts over OpenType fonts to avoid falling back to things like Arial (opentype) when you ask for Helvetica (type1) 11588
gfxGdkNativeRenderer.cpp 474
gfxGdkNativeRenderer.h This class lets us take code that draws into an GDK drawable and lets us use it to draw into any Thebes context. The user should subclass this class, override DrawWithGDK, and then call Draw(). The drawing will be subjected to all Thebes transformations, clipping etc. 2358
gfxGlyphExtents.cpp 4657
gfxGlyphExtents.h This stores glyph bounds information for a particular gfxFont, at a particular appunits-per-dev-pixel ratio (because the compressed glyph width array is stored in appunits). We store a hashtable from glyph IDs to float bounding rects. For the common case where the glyph has no horizontal left bearing, and no y overflow above the font ascent or below the font descent, and tight bounding boxes are not required, we avoid storing the glyph ID in the hashtable and instead consult an array of 16-bit glyph XMost values (in appunits). This array always has an entry for the font's space glyph --- the width is assumed to be zero. 5222
gfxGradientCache.cpp This class is what is cached. It need to be allocated in an object separated to the cache entry to be able to be tracked by the nsExpirationTracker. 10149
gfxGradientCache.h 805
gfxGraphiteShaper.cpp Creation and destruction; on deletion, release any font tables we're holding 18609
gfxGraphiteShaper.h GFX_GRAPHITESHAPER_H 2767
gfxHarfBuzzShaper.cpp Creation and destruction; on deletion, release any font tables we're holding 65309
gfxHarfBuzzShaper.h For HarfBuzz font callback functions, font_data is a ptr to a FontCallbackData struct 7191
gfxImageSurface.cpp static 9840
gfxImageSurface.h A raw image buffer. The format can be set in the constructor. Its main purpose is for storing read-only images and using it as a source surface, but it can also be drawn to. 6011
gfxLanguageTagList.cpp Derived from the IANA language subtag registry by Created on Mon Nov 7 14:52:44 2011. * * * * This file contains MACHINE-GENERATED DATA, do not edit! * * * * * 442244
gfxLineSegment.h Determines if two line segments intersect, and returns the intersection point in aIntersection if they do. Coincident lines are considered not intersecting as they don't have an intersection point. 2618
gfxMacFont.cpp 22903
gfxMacFont.h override Measure to add padding for antialiasing 3713
gfxMacPlatformFontList.h 9346 71816
gfxMathTable.cpp 6568
gfxMathTable.h Used by |gfxFont| to represent the MATH table of an OpenType font. Each |gfxFont| owns at most one |gfxMathTable| instance. 4769
gfxMatrix.h GFX_MATRIX_H 436
gfxOTSUtils.h 5680
gfxPattern.cpp 6921
gfxPattern.h Get an Azure Pattern for the current Cairo pattern. aPattern transform specifies the transform that was set on the DrawTarget when the pattern was set. When this is nullptr it is assumed the transform is identical to the current transform. 2817
gfxPlatform.cpp 124738
gfxPlatform.h 35054
gfxPlatformFontList.cpp 99107
gfxPlatformFontList.h A helper class used to create a SharedBitSet instance in a FontList's shared memory, while ensuring that we avoid bloating memory by avoiding creating duplicate instances. 35927
gfxPlatformGtk.cpp Undefine the Status from Xlib since it will conflict with system headers on OSX 27879
gfxPlatformGtk.h Calls XFlush if xrender is enabled. 2943
gfxPlatformMac.cpp 38829
gfxPlatformMac.h GFX_PLATFORM_MAC_H 3403
gfxPoint.h GFX_POINT_H 469
gfxQuad.h GFX_QUAD_H 1612
gfxQuartzNativeDrawing.cpp 2945
gfxQuartzNativeDrawing.h Create native Quartz drawing for a rectangle bounded by nativeRect. Typical usage looks like: gfxQuartzNativeDrawing nativeDraw(ctx, nativeRect); CGContextRef cgContext = nativeDraw.BeginNativeDrawing(); if (!cgContext) return NS_ERROR_FAILURE; ... call Quartz operations on CGContextRef to draw to nativeRect ... nativeDraw.EndNativeDrawing(); aNativeRect is the size of the surface (in Quartz/Cocoa points) that will be created _if_ the gfxQuartzNativeDrawing decides to create a new surface and CGContext for its drawing operations, which it then composites into the target DrawTarget. (Note that aNativeRect will be ignored if the gfxQuartzNativeDrawing uses the target DrawTarget directly.) The optional aBackingScale parameter is a scaling factor that will be applied when creating and rendering into such a temporary surface. 2443
gfxQuartzSurface.cpp 3565
gfxQuartzSurface.h GFX_QUARTZSURFACE_H 1243
gfxQuaternion.h GFX_QUATERNION_H 4139
gfxRect.h GFX_RECT_H 467
gfxScriptItemizer.cpp If the stack is now empty, reset the stack pointers to their initial values. 8253
gfxScriptItemizer.h GFX_SCRIPTITEMIZER_H 3344
gfxSharedImageSurface.h GFX_SHARED_IMAGESURFACE_H 1079
gfxSkipChars.cpp 4688
gfxSkipChars.h gfxSkipChars is a data structure representing a list of characters that have been skipped. The initial string is called the "original string" and after skipping some characters, the result is called the "skipped string". gfxSkipChars provides efficient ways to translate between offsets in the original string and the skipped string. It is used by textrun code to keep track of offsets before and after text transformations such as whitespace compression and control code deletion. 8863
gfxSVGGlyphs.cpp static 15439
gfxSVGGlyphs.h Wraps an SVG document contained in the SVG table of an OpenType font. There may be multiple SVG documents in an SVG table which we lazily parse so we have an instance of this class for every document in the SVG table which contains a glyph ID which has been used Finds and looks up elements contained in the SVG document which have glyph mappings to be drawn by gfxSVGGlyphs 7591
gfxTextRun.cpp 145548
gfxTextRun.h Callback for Draw() to use when drawing text with mode DrawMode::GLYPH_PATH. 60863
gfxTypes.h Currently needs to be 'double' for Cairo compatibility. Could become 'float', perhaps, in some configurations. 3971
gfxUserFontSet.cpp 51857
gfxUserFontSet.h 31001
gfxUtils.cpp Dump a raw image to the default log. This function is exported from libxul, so it can be called from any library in addition to (of course) from a debugger. Note: this helper currently assumes that all 2-bytepp images are r5g6b5, and that all 4-bytepp images are r8g8b8a8. 51848
gfxUtils.h Premultiply or Unpremultiply aSourceSurface, writing the result to aDestSurface or back into aSourceSurface if aDestSurface is null. If aDestSurface is given, it must have identical format, dimensions, and stride as the source. If the source is not SurfaceFormat::A8R8G8B8_UINT32, no operation is performed. If aDestSurface is given, the data is copied over. 13666
gfxWindowsNativeDrawing.cpp 10655
gfxWindowsNativeDrawing.h Flags for notifying this class what kind of operations the native drawing supports 3296
gfxWindowsPlatform.cpp 67596
gfxWindowsPlatform.h XXX to get CAIRO_HAS_DWRITE_FONT and cairo_win32_scaled_font_select_font 7769
gfxWindowsSurface.cpp 4956
gfxWindowsSurface.h include windows.h for the HWND and HDC definitions that we need. 1513
gfxXlibNativeRenderer.cpp We have four basic strategies available: 1) 'direct': If the target is an xlib surface, and other conditions are met, we can pass the underlying drawable directly to the callback. 2) 'simple': If the drawing is opaque, or we can draw to a surface with an alpha channel, then we can create a temporary xlib surface, pass its underlying drawable to the callback, and composite the result using cairo. 3) 'copy-background': If the drawing is not opaque but the target is opaque, and we can draw to a surface with format such that pixel conversion to and from the target format is exact, we can create a temporary xlib surface, copy the background from the target, pass the underlying drawable to the callback, and copy back to the target. This strategy is not used if the pixel format conversion is not exact, because that would mean that drawing intended to be very transparent messes with other content. The strategy is prefered over simple for non-opaque drawing and opaque targets on the same screen as compositing without alpha is a simpler operation. 4) 'alpha-extraction': create a temporary xlib surface, fill with black, pass its underlying drawable to the callback, copy the results to a cairo image surface, repeat with a white background, update the on-black image alpha values by comparing the two images, then paint the on-black image using cairo. Sure would be nice to have an X extension or GL to do this for us on the server... 22290
gfxXlibNativeRenderer.h This class lets us take code that draws into an X drawable and lets us use it to draw into any Thebes context. The user should subclass this class, override DrawWithXib, and then call Draw(). The drawing will be subjected to all Thebes transformations, clipping etc. 4392
gfxXlibSurface.cpp For XESetCloseDisplay 18644
gfxXlibSurface.h GFX_XLIBSURFACE_H 4534 7483
nsIFontLoadCompleteCallback.idl 443
PrintTarget.cpp static 5846
PrintTarget.h A class that is used to draw output that is to be sent to a printer or print preview. This class wraps a cairo_surface_t* and provides access to it via a DrawTarget. The various checkpointing methods manage the state of the platform specific cairo_surface_t*. 6393
PrintTargetCG.h CoreGraphics printing target. 1452 aCairoSurface 5844
PrintTargetPDF.cpp static 2740
PrintTargetPDF.h PDF printing target. 1025
PrintTargetPS.cpp static 3555
PrintTargetPS.h PostScript printing target. 1452
PrintTargetRecording.cpp static 3953
PrintTargetRecording.h Recording printing target. This exists for use on e10s's content process in order to record print output, send it over to the parent process, and replay it on a DrawTarget there for printing. 1242
PrintTargetSkPDF.cpp not using cairo_surface_t 3654
PrintTargetSkPDF.h Skia PDF printing target. 2365
PrintTargetThebes.cpp static 2781
PrintTargetThebes.h XXX Remove this class. This class should go away once all the logic from the gfxASurface subclasses has been moved to new PrintTarget subclasses and we no longer need to wrap a gfxASurface. When removing this class, be sure to make PrintTarget::MakeDrawTarget non-virtual! 1681
PrintTargetWindows.cpp static 4144
PrintTargetWindows.h include windows.h for the HDC definitions that we need. 1225
SharedFontList-impl.h Data used to initialize a font family alias (a "virtual" family that refers to some or all of the faces of another family, used when alternate family names are found in the font resource for localization or for styled subfamilies). AliasData records are collected incrementally while scanning the fonts, and then used to set up the Aliases list in the shared font list. 15491
SharedFontList.cpp 46688
SharedFontList.h A Pointer in the shared font list contains a packed index/offset pair, with a 12-bit index into the array of shared-memory blocks, and a 20-bit offset into the block. The maximum size of each block is therefore 2^20 bytes (1 MB) if sub-parts of the block are to be allocated; however, a larger block (up to 2^32 bytes) can be created and used as a single allocation if necessary. 14911
SkMemoryReporter.cpp 904
SoftwareVsyncSource.cpp 4238
SoftwareVsyncSource.h GFX_SOFTWARE_VSYNC_SOURCE_H 1924 10059 3407 7200
ThebesRLBox.h 998
ThebesRLBoxTypes.h 1091
VsyncSource.cpp 9433
VsyncSource.h 5659