Gecko:DisplayListBasedInvalidation: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 24: Line 24:
* Bordered frame size changes
* Bordered frame size changes
** We don't really want to invalidate the entire area here, but we do need to invalidate some of the internal area as well as the extended bounds.
** We don't really want to invalidate the entire area here, but we do need to invalidate some of the internal area as well as the extended bounds.
= Debugging Invalidations Problems =
== Invalidation Logging ==
Enable this by defining 'DEBUG_INVALIDATIONS' in nsViewManager.cpp and FrameLayerBuilder.cpp and recompile/link these files.
Running with MOZ_DUMP_PAINT_LIST=1 in your environment is recommended to view the display list that is being analyzed by DLBI, but note that this adds a huge amount of extra log data.
This should then dump (to stdout) all invalidations generated by DLBI, along with the reason. Note that this doesn't include invalidations that come from the layers system (e.g. new layer creation, or layer backing store deleted due to inactivity).
There are five general reasons for invalidation:
* Content added -  Display item type SolidColor(0x116116c08) added to layer 0x119286800!
** New display item added that didn't exist during the previous paint, we invalidate the value of nsDisplayItemGeometry::ComputeInvalidationRegion()
* Content removed - Invalidating unused display item (67) belonging to frame 0x11b5bb288 from layer 0x116fd4800
** Display item from the previous paint doesn't exist during this paint, we invalidate the value of nsDisplayItemGeometry::ComputeInvalidationRegion()
** The (67) value is the display item key, see layout/base/nsDisplayItemTypes.h
* Invalid frame - Display item type nsDisplaySVGPathGeometry(0x11c7ffae8) (in layer 0x11c51b000) belongs to an invalidated frame!
** The frame that created the item has been marked (via nsIFrame::InvalidateFrame) as needing all its content redrawn.
** We invalidate the value of nsDisplayItemGeometry::ComputeInvalidationRegion()
* Content changed size - Display item type TableBorderBackground(0x11a885748) (in layer 0x11b884c00) changed geometry!
** The display item itself has determined that its size has changed, and determined what area needs to be repainted.
** The virtual implementation of nsDisplayItem::ComputeInvalidationRegion() does this calculaton.
* Inactive Layer tree has changed - Inactive LayerManager(0x11a3e8e20) for display item Opacity(0x116bf6560) has an invalid region - invalidating layer 0x119286800
** When we have an inactive layer subtree, DLBI runs on the individual layers (and is logged as such) and we run LayerTreeInvalidation to find the changed area of the layer tree.
Logging Wish List:
* Print paint count to the log as well as put it onscreen to help correlating observed bugs with log data.
* Easier way to enable/disable logging, have it work in opt builds.
* Make logging work on Android.
* Convert display item type numbers to names.
* View the inactive layer trees created/processed when MOZ_DUMP_PAINT_LIST=1
== Other Useful Tools ==
* Turn on paint flashing pref - nglayout.debug.paint_flashing
Confirmed users
44

edits