mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
4ca813ae6e
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 | ||
public | ||
src | ||
test | ||
Makefile.in |