зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1614655 - Part 3: Retain WR display items for nsDisplayBorder, nsDisplayText, nsDisplayButtonBorder, and nsDisplayButtonForeground r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D66444 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ba0e838277
Коммит
3ccee006fc
|
@ -232,6 +232,7 @@ bool nsDisplayButtonBorder::CreateWebRenderCommands(
|
|||
nsDisplayListBuilder* aDisplayListBuilder) {
|
||||
// This is really a combination of paint box shadow inner +
|
||||
// paint border.
|
||||
aBuilder.StartGroup(this);
|
||||
const nsRect buttonRect = nsRect(ToReferenceFrame(), mFrame->GetSize());
|
||||
bool snap;
|
||||
nsRegion visible = GetBounds(aDisplayListBuilder, &snap);
|
||||
|
@ -244,11 +245,17 @@ bool nsDisplayButtonBorder::CreateWebRenderCommands(
|
|||
nsRect(ToReferenceFrame(), mFrame->GetSize()), mFrame->Style(),
|
||||
&borderIsEmpty, mFrame->GetSkipSides());
|
||||
if (!br) {
|
||||
if (borderIsEmpty) {
|
||||
aBuilder.FinishGroup();
|
||||
} else {
|
||||
aBuilder.CancelGroup();
|
||||
}
|
||||
|
||||
return borderIsEmpty;
|
||||
}
|
||||
|
||||
br->CreateWebRenderCommands(this, aBuilder, aResources, aSc);
|
||||
|
||||
aBuilder.FinishGroup();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -373,7 +380,10 @@ bool nsDisplayButtonForeground::CreateWebRenderCommands(
|
|||
return borderIsEmpty;
|
||||
}
|
||||
|
||||
aBuilder.StartGroup(this);
|
||||
br->CreateWebRenderCommands(this, aBuilder, aResources, aSc);
|
||||
aBuilder.FinishGroup();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -5693,14 +5693,18 @@ bool nsDisplayBorder::CreateWebRenderCommands(
|
|||
nsDisplayListBuilder* aDisplayListBuilder) {
|
||||
nsRect rect = nsRect(ToReferenceFrame(), mFrame->GetSize());
|
||||
|
||||
aBuilder.StartGroup(this);
|
||||
ImgDrawResult drawResult = nsCSSRendering::CreateWebRenderCommandsForBorder(
|
||||
this, mFrame, rect, aBuilder, aResources, aSc, aManager,
|
||||
aDisplayListBuilder);
|
||||
|
||||
if (drawResult == ImgDrawResult::NOT_SUPPORTED) {
|
||||
aBuilder.CancelGroup();
|
||||
return false;
|
||||
}
|
||||
|
||||
aBuilder.FinishGroup();
|
||||
|
||||
nsDisplayBorderGeometry::UpdateDrawResult(this, drawResult);
|
||||
return true;
|
||||
};
|
||||
|
@ -9539,9 +9543,18 @@ bool nsDisplayText::CreateWebRenderCommands(
|
|||
RefPtr<gfxContext> textDrawer = aBuilder.GetTextContext(
|
||||
aResources, aSc, aManager, this, bounds, deviceOffset);
|
||||
|
||||
RenderToContext(textDrawer, aDisplayListBuilder, true);
|
||||
aBuilder.StartGroup(this);
|
||||
|
||||
return textDrawer->GetTextDrawer()->Finish();
|
||||
RenderToContext(textDrawer, aDisplayListBuilder, true);
|
||||
const bool result = textDrawer->GetTextDrawer()->Finish();
|
||||
|
||||
if (result) {
|
||||
aBuilder.FinishGroup();
|
||||
} else {
|
||||
aBuilder.CancelGroup();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void nsDisplayText::RenderToContext(gfxContext* aCtx,
|
||||
|
|
Загрузка…
Ссылка в новой задаче