Bug 1722258 - Add FallbackRenderer to replace BasicLayerManager usage. r=miko

Differential Revision: https://phabricator.services.mozilla.com/D120921
This commit is contained in:
Matt Woodrow
2021-08-05 06:48:34 +00:00
parent d4e496f271
commit 7daf855177
11 changed files with 178 additions and 25 deletions

View File

@@ -6450,8 +6450,14 @@ void PresShell::Paint(nsView* aViewToPaint, const nsRegion& aDirtyRegion,
bgcolor = NS_ComposeColors(bgcolor, mCanvasBackgroundColor);
if (!layerManager) {
// TODO: Once we support WindowRenderers that aren't a LayerManager,
// then we need to handle this single color case for them.
FallbackRenderer* fallback = renderer->AsFallback();
MOZ_ASSERT(fallback);
if (aFlags & PaintFlags::PaintComposite) {
nsIntRect bounds = presContext->GetVisibleArea().ToOutsidePixels(
presContext->AppUnitsPerDevPixel());
fallback->EndTransactionWithColor(bounds, ToDeviceColor(bgcolor));
}
return;
}