Auto-Submit | +1 |
Commit-Queue | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Commit-Queue | +2 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
CanvasTextNG: Fix cache memory leak through texImage2D
UniqueFontSelector allows to cache unlimited number of `Font` instances
if they are used in a single frame, however we failed to notify it of
frame changes if a canvas is used for `texImage2D()`.
This CL fixes the issue by calling `DidSwitchFrame()` in
`OffscreenCanvas::GetSourceImageForCanvas()`.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (RuntimeEnabledFeatures::CanvasTextTexImage2DFixEnabled()) {
if (plain_text_painter_) {
plain_text_painter_->DidSwitchFrame();
}
if (unique_font_selector_) {
unique_font_selector_->DidSwitchFrame();
}
}
We should put this in a new `OffscreenCanvas::FinalizeFrame` method which should be called for all the various code paths where an OffscreenCanvas is exported e.g. createImageBitmap, toBlob, transferToImageBitmap, etc. Maybe look for existing calls to `OffscreenCanvasRenderingContext2D::FinalizeFrame` and then replace those with `OffscreenCanvas::FinalizeFrame` which calls into `OffscreenCanvasRenderingContext2D::FinalizeFrame` in addition to doing this `DidSwitchFrame` stuff. WDYT?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |