mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-14 15:37:55 +00:00
f55223784a
The basic idea is that whenever a layer transaction updates the window, we clear out the invalidation state for the canvas rendering context, using a DidTransactionCallback registered on the layer(s) for the canvas, which calls MakeContextClean. The DidTransactionCallbacks are directed to the user data attached to the Layer, which holds a strong reference to the canvas element. This ensures that the element lives as long as the layer. Layers are destroyed when the presentation is torn down (including if the frame is destroyed), so we can't have a leak here. The reference to the canvas element is only strong because the layer might briefly outlive the frame (the layer won't be destroyed until the next paint of the window). This patch moves responsibility for calling CanvasLayer::Updated and nsFrame::MarkLayersActive from the canvas context to nsHTMLCanvasElement::InvalidateFrame. We call Updated on the retained CanvasLayer, if there is one; any other CanvasLayers created for this canvas would only be used once, and have Updated called on them in BuildLayer when created. |
||
---|---|---|
.. | ||
crashtests | ||
tests | ||
FrameLayerBuilder.cpp | ||
FrameLayerBuilder.h | ||
FramePropertyTable.cpp | ||
FramePropertyTable.h | ||
Makefile.in | ||
nsBidi.cpp | ||
nsBidi.h | ||
nsBidiPresUtils.cpp | ||
nsBidiPresUtils.h | ||
nsCaret.cpp | ||
nsCaret.h | ||
nsChangeHint.h | ||
nsChildIterator.cpp | ||
nsChildIterator.h | ||
nsCompatibility.h | ||
nsCounterManager.cpp | ||
nsCounterManager.h | ||
nsCSSColorUtils.cpp | ||
nsCSSColorUtils.h | ||
nsCSSFrameConstructor.cpp | ||
nsCSSFrameConstructor.h | ||
nsCSSRendering.cpp | ||
nsCSSRendering.h | ||
nsCSSRenderingBorders.cpp | ||
nsCSSRenderingBorders.h | ||
nsDisplayItemTypes.h | ||
nsDisplayList.cpp | ||
nsDisplayList.h | ||
nsDocumentViewer.cpp | ||
nsFrameManager.cpp | ||
nsFrameManager.h | ||
nsFrameManagerBase.h | ||
nsFrameTraversal.cpp | ||
nsFrameTraversal.h | ||
nsGenConList.cpp | ||
nsGenConList.h | ||
nsIDocumentViewer.h | ||
nsIDocumentViewerPrint.h | ||
nsIFrameTraversal.h | ||
nsIImageMap.h | ||
nsILayoutDebugger.h | ||
nsILayoutHistoryState.h | ||
nsImageLoader.cpp | ||
nsImageLoader.h | ||
nsIPercentHeightObserver.h | ||
nsIPresShell.h | ||
nsIReflowCallback.h | ||
nsIStyleSheetService.idl | ||
nsLayoutDebugger.cpp | ||
nsLayoutErrors.h | ||
nsLayoutHistoryState.cpp | ||
nsLayoutUtils.cpp | ||
nsLayoutUtils.h | ||
nsPresArena.cpp | ||
nsPresArena.h | ||
nsPresContext.cpp | ||
nsPresContext.h | ||
nsPresShell.cpp | ||
nsPresState.h | ||
nsQuoteList.cpp | ||
nsQuoteList.h | ||
nsRefreshDriver.cpp | ||
nsRefreshDriver.h | ||
nsStyleChangeList.cpp | ||
nsStyleChangeList.h | ||
nsStyleConsts.h | ||
nsStyleSheetService.cpp | ||
nsStyleSheetService.h | ||
PaintTracker.cpp | ||
PaintTracker.h | ||
RestyleTracker.cpp | ||
RestyleTracker.h |