Gecko:DisplayListBasedInvalidation: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
Display List Based Invalidation
Display List Based Invalidation - Bug 539356


Instead of invalidating areas of the screen as we do currently, we want invalidation to happen at the display list/layer boundary to reduce unnecessary redrawing
Instead of invalidating areas of the screen as we do currently, we want invalidation to happen at the display list/layer boundary to reduce unnecessary redrawing

Revision as of 04:08, 4 October 2012

Display List Based Invalidation - Bug 539356

Instead of invalidating areas of the screen as we do currently, we want invalidation to happen at the display list/layer boundary to reduce unnecessary redrawing

Basic Outline

  • Display List changes
    • We want to compare the new display to the old one and invalidate layer regions of anything that has changed.
    • We already cache most of the information that we need, and iterate over it in FrameLayerBuilder.
      • We need to add the old bounds of the display item into the cached data
      • Some items (e.g. borders) need two rectangles: an outer rect and an inner rect
    • Invalidating display items that no longer exist.
      • How do we do this?
      • We could iterate over the frames DisplayItemData at the end of nsFrame::BuildDisplayList, and send invalidations for any display item types that weren't just created.
      • FrameLayerBuilder already detects items being added to or removed from a layer, so this won't be a problem if we do the processing in FrameLayerBuilder
  • Style and other changes
    • These should invalidate all (?) display items for the frame, so we can just set a dirty bit on the frame and check this from FrameLayerBuilder

Potential Problems

  • Window resizing / incremental loading
    • We want to make sure that we are only invalidating the new areas, not the entire page
  • 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.