Bug 1722258 - Convert more LayerManager usage to use WindowRenderer. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120920
This commit is contained in:
@@ -6438,6 +6438,8 @@ void PresShell::Paint(nsView* aViewToPaint, const nsRegion& aDirtyRegion,
|
||||
return;
|
||||
}
|
||||
|
||||
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.
|
||||
@@ -6445,10 +6447,8 @@ void PresShell::Paint(nsView* aViewToPaint, const nsRegion& aDirtyRegion,
|
||||
}
|
||||
|
||||
if (layerManager->GetBackendType() == layers::LayersBackend::LAYERS_WR) {
|
||||
nsPresContext* pc = GetPresContext();
|
||||
LayoutDeviceRect bounds = LayoutDeviceRect::FromAppUnits(
|
||||
pc->GetVisibleArea(), pc->AppUnitsPerDevPixel());
|
||||
bgcolor = NS_ComposeColors(bgcolor, mCanvasBackgroundColor);
|
||||
presContext->GetVisibleArea(), presContext->AppUnitsPerDevPixel());
|
||||
WebRenderBackgroundData data(wr::ToLayoutRect(bounds),
|
||||
wr::ToColorF(ToDeviceColor(bgcolor)));
|
||||
WrFiltersHolder wrFilters;
|
||||
@@ -6461,10 +6461,8 @@ void PresShell::Paint(nsView* aViewToPaint, const nsRegion& aDirtyRegion,
|
||||
|
||||
RefPtr<ColorLayer> root = layerManager->CreateColorLayer();
|
||||
if (root) {
|
||||
nsPresContext* pc = GetPresContext();
|
||||
nsIntRect bounds =
|
||||
pc->GetVisibleArea().ToOutsidePixels(pc->AppUnitsPerDevPixel());
|
||||
bgcolor = NS_ComposeColors(bgcolor, mCanvasBackgroundColor);
|
||||
nsIntRect bounds = presContext->GetVisibleArea().ToOutsidePixels(
|
||||
presContext->AppUnitsPerDevPixel());
|
||||
root->SetColor(ToDeviceColor(bgcolor));
|
||||
root->SetVisibleRegion(LayerIntRegion::FromUnknownRegion(bounds));
|
||||
layerManager->SetRoot(root);
|
||||
|
||||
Reference in New Issue
Block a user