Name Description Size
ActiveLayerTracker.cpp This tracks the state of a frame that may need active layers due to ongoing content changes or style changes that indicate animation. When no changes of *any* kind are detected after 75-100ms we remove this object. Because we only track all kinds of activity with a single nsExpirationTracker, it's possible a frame might remain active somewhat spuriously if different kinds of changes kept happening, but that almost certainly doesn't matter. 21485
ActiveLayerTracker.h This class receives various notifications about style changes and content changes that affect layerization decisions, and implements the heuristics that drive those decisions. It manages per-frame state to support those heuristics. 6375
BorderCache.h mozilla_BorderCache_h_ 1802
BorderConsts.h mozilla_BorderConsts_h_ 807
crashtests 24
DashedCornerFinder.cpp 12606
DashedCornerFinder.h 9710
DisplayItemClip.cpp 18016
DisplayItemClip.h An DisplayItemClip represents the intersection of an optional rectangle with a list of rounded rectangles (which is often empty), all in appunits. It can represent everything CSS clipping can do to an element (except for SVG clip-path), including no clipping at all. 7226
DisplayItemClipChain.cpp static 3083
DisplayItemClipChain.h A DisplayItemClipChain is a linked list of DisplayItemClips where each clip is associated with an active scrolled root that describes what the clip moves with. We use a chain instead of just one intersected clip due to async scrolling: A clip that moves along with a display item can be fused to the item's contents when drawing the layer contents, but all other clips in the chain need to be kept separate so that they can be applied at composition time, after any async scroll offsets have been applied. The clip chain is created during display list construction by the builder's DisplayListClipState. The clip chain order is determined by the active scrolled root order. For every DisplayItemClipChain object |clipChain|, the following holds: !clipChain->mParent || ActiveScrolledRoot::IsAncestor(clipChain->mParent->mASR, clipChain->mASR). The clip chain can skip over active scrolled roots. That just means that there is no clip that moves with the skipped ASR in this chain. 3625
DisplayListChecker.cpp 12373
DisplayListChecker.h 1408
DisplayListClipState.cpp 5707
DisplayListClipState.h All clip coordinates are in appunits relative to the reference frame for the display item we're building. 9926
DottedCornerFinder.cpp 16887
DottedCornerFinder.h 14086
FrameLayerBuilder.cpp The address of gPaintedDisplayItemLayerUserData is used as the user data key for PaintedLayers created by FrameLayerBuilder. It identifies PaintedLayers used to draw non-layer content, which are therefore eligible for recycling. We want display items to be able to create their own dedicated PaintedLayers in BuildLayer, if necessary, and we wouldn't want to accidentally recycle those. The user data is a PaintedDisplayItemLayerUserData. 286123
FrameLayerBuilder.h Retained data storage: Each layer manager (widget, and inactive) stores a LayerManagerData object that keeps a hash-set of DisplayItemData items that were drawn into it. Each frame also keeps a list of DisplayItemData pointers that were created for that frame. DisplayItemData objects manage these lists automatically. During layer construction we update the data in the LayerManagerData object, marking items that are modified. At the end we sweep the LayerManagerData hash-set and remove all items that haven't been modified. 28633
LayerState.h 785
MaskLayerImageCache.cpp 1895
MaskLayerImageCache.h Keeps a record of image containers for mask layers, containers are mapped from the rounded rects used to create them. The cache stores MaskLayerImageEntries indexed by MaskLayerImageKeys. Each MaskLayerImageEntry owns a heap-allocated MaskLayerImageKey (heap-allocated so that a mask layer's userdata can keep a pointer to the key for its image, in spite of the hashtable moving its entries around). The key consists of the rounded rects used to create the mask, an nsRefPtr to the ImageContainer containing the image, and a count of the number of layers currently using this ImageContainer. When the key's layer count is zero, the cache may remove the entry, which deletes the key object. 8814
MatrixStack.h MatrixStack stores a stack of matrices and keeps track of the accumulated transform matrix. 1556
moz.build 1855
nsCSSRendering.cpp utility functions for drawing borders and backgrounds 176957
nsCSSRendering.h utility functions for drawing borders and backgrounds 38973
nsCSSRenderingBorders.cpp nsCSSRendering::PaintBorder nsCSSRendering::PaintOutline -> DrawBorders DrawBorders -> Ability to use specialized approach? |- Draw using specialized function |- separate corners? |- dashed side mask | -> can border be drawn in 1 pass? (e.g., solid border same color all around) |- DrawBorderSides with all 4 sides -> more than 1 pass? |- for each corner |- clip to DoCornerClipSubPath |- for each side adjacent to corner |- clip to GetSideClipSubPath |- DrawBorderSides with one side |- for each side |- GetSideClipWithoutCornersRect |- DrawDashedOrDottedSide || DrawBorderSides with one side 137715
nsCSSRenderingBorders.h Helper class that handles border rendering. aDrawTarget -- the DrawTarget to which the border should be rendered outsideRect -- the rectangle on the outer edge of the border For any parameter where an array of side values is passed in, they are in top, right, bottom, left order. borderStyles -- one border style enum per side borderWidths -- one border width per side borderRadii -- a RectCornerRadii struct describing the w/h for each rounded corner. If the corner doesn't have a border radius, 0,0 should be given for it. borderColors -- one nscolor per side skipSides -- a bit mask specifying which sides, if any, to skip backgroundColor -- the background color of the element. Used in calculating colors for 2-tone borders, such as inset and outset gapRect - a rectangle that should be clipped out to leave a gap in a border, or nullptr if none. 12812
nsCSSRenderingGradients.cpp utility functions for drawing borders and backgrounds 49143
nsCSSRenderingGradients.h Prepare a nsCSSGradientRenderer for a gradient for an element. aIntrinsicSize - the size of the source gradient. 4316
nsDisplayItemTypes.h It's useful to be able to dynamically check the type of certain items. Every subclass of nsDisplayItem must have a new type added here for the purposes of easy comparison and matching of items in different display lists. 2193
nsDisplayItemTypesList.h 7749
nsDisplayList.cpp structures that represent things to be painted (ordered in z-order), used during painting and hit testing 403054
nsDisplayList.h structures that represent things to be painted (ordered in z-order), used during painting and hit testing 273764
nsDisplayListArenaTypes.h a list of all types that can be allocated in the display list's nsPresArena, for preprocessing 617
nsDisplayListInvalidation.cpp 4787
nsDisplayListInvalidation.h This stores the geometry of an nsDisplayItem, and the area that will be affected when painting the item. It is used to retain information about display items so they can be compared against new display items in the next paint. 11378
nsImageRenderer.cpp utility code for drawing images as CSS borders, backgrounds, and shapes. 41281
nsImageRenderer.h This is a small wrapper class to encapsulate image drawing that can draw an nsStyleImage image, which may internally be a real image, a sub image, or a CSS gradient. @note Always call the member functions in the order of PrepareImage(), SetSize(), and Draw*(). 12217
PaintTracker.cpp 441
PaintTracker.h 826
RetainedDisplayListBuilder.cpp Code for doing display list building for a modified subset of the window, and then merging it into the existing display list (for the full window). The approach primarily hinges on the observation that the 'true' ordering of display items is represented by a DAG (only items that intersect in 2d space have a defined ordering). Our display list is just one of a many possible linear representations of this ordering. Each time a frame changes (gets a new ComputedStyle, or has a size/position change), we schedule a paint (as we do currently), but also reord the frame that changed. When the next paint occurs we union the overflow areas (in screen space) of the changed frames, and compute a rect/region that contains all changed items. We then build a display list just for this subset of the screen and merge it into the display list from last paint. Any items that exist in one list and not the other must not have a defined ordering in the DAG, since they need to intersect to have an ordering and we would have built both in the new list if they intersected. Given that, we can align items that appear in both lists, and any items that appear between matched items can be inserted into the merged list in any order. 56917
RetainedDisplayListBuilder.h RetainedDisplayListData contains frame invalidation information. It is stored in root frames, and used by RetainedDisplayListBuilder. Currently this is implemented as a map of frame pointers to flags. 8840
RetainedDisplayListHelpers.h 5442
TransformClipNode.h TransformClipNode stores a transformation matrix and a post-transform clip rect. They can be used to transform and clip a display item inside a flattened nsDisplayTransform to the coordinate space of that nsDisplayTransform. 4167