зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1792285 - Part 1: Refactor `DisplayListBuilder::PushIFrame` in preparation for proper subpixel snapping. r=emilio
Incoming `bounds` parameter is now `LayoutDeviceRect` in preparation for proper subpixel snapping. Differential Revision: https://phabricator.services.mozilla.com/D159884
This commit is contained in:
Родитель
4bba6dade3
Коммит
96cf231f1f
|
@ -225,8 +225,7 @@ void WebRenderImageData::CreateAsyncImageWebRenderCommands(
|
|||
// context need to be done manually and pushed over to the parent side,
|
||||
// where it will be done when we build the display list for the iframe.
|
||||
// That happens in AsyncImagePipelineManager.
|
||||
wr::LayoutRect r = wr::ToLayoutRect(aBounds);
|
||||
aBuilder.PushIFrame(r, aIsBackfaceVisible, mPipelineId.ref(),
|
||||
aBuilder.PushIFrame(aBounds, aIsBackfaceVisible, mPipelineId.ref(),
|
||||
/*ignoreMissingPipelines*/ false);
|
||||
|
||||
WrBridge()->AddWebRenderParentCommand(OpUpdateAsyncImagePipeline(
|
||||
|
@ -335,8 +334,7 @@ void WebRenderInProcessImageData::CreateWebRenderCommands(
|
|||
// context need to be done manually and pushed over to the parent side,
|
||||
// where it will be done when we build the display list for the iframe.
|
||||
// That happens in AsyncImagePipelineManager.
|
||||
wr::LayoutRect r = wr::ToLayoutRect(aBounds);
|
||||
aBuilder.PushIFrame(r, aIsBackfaceVisible, mPipelineId.ref(),
|
||||
aBuilder.PushIFrame(aBounds, aIsBackfaceVisible, mPipelineId.ref(),
|
||||
/*ignoreMissingPipelines*/ false);
|
||||
|
||||
WrBridge()->AddWebRenderParentCommand(OpUpdateAsyncImagePipeline(
|
||||
|
|
|
@ -1370,13 +1370,14 @@ void DisplayListBuilder::PushYCbCrInterleavedImage(
|
|||
aSupportsExternalCompositing);
|
||||
}
|
||||
|
||||
void DisplayListBuilder::PushIFrame(const wr::LayoutRect& aBounds,
|
||||
void DisplayListBuilder::PushIFrame(const LayoutDeviceRect& aDevPxBounds,
|
||||
bool aIsBackfaceVisible,
|
||||
PipelineId aPipeline,
|
||||
bool aIgnoreMissingPipeline) {
|
||||
mRemotePipelineIds.AppendElement(aPipeline);
|
||||
wr_dp_push_iframe(mWrState, aBounds, MergeClipLeaf(aBounds),
|
||||
aIsBackfaceVisible, &mCurrentSpaceAndClipChain, aPipeline,
|
||||
const auto bounds = wr::ToLayoutRect(aDevPxBounds);
|
||||
wr_dp_push_iframe(mWrState, bounds, MergeClipLeaf(bounds), aIsBackfaceVisible,
|
||||
&mCurrentSpaceAndClipChain, aPipeline,
|
||||
aIgnoreMissingPipeline);
|
||||
}
|
||||
|
||||
|
|
|
@ -577,7 +577,7 @@ class DisplayListBuilder final {
|
|||
bool aPreferCompositorSurface = false,
|
||||
bool aSupportsExternalCompositing = false);
|
||||
|
||||
void PushIFrame(const wr::LayoutRect& aBounds, bool aIsBackfaceVisible,
|
||||
void PushIFrame(const LayoutDeviceRect& aDevPxBounds, bool aIsBackfaceVisible,
|
||||
wr::PipelineId aPipeline, bool aIgnoreMissingPipeline);
|
||||
|
||||
// XXX WrBorderSides are passed with Range.
|
||||
|
|
|
@ -181,10 +181,9 @@ class nsDisplayCanvas final : public nsPaintedDisplayItem {
|
|||
// result, a bunch of the calculations normally done as part of that
|
||||
// stacking context need to be done manually and pushed over to the
|
||||
// parent side, where it will be done when we build the display list for
|
||||
// the iframe. That happens in WebRenderCompositableHolder.
|
||||
|
||||
wr::LayoutRect r = wr::ToLayoutRect(bounds);
|
||||
aBuilder.PushIFrame(r, !BackfaceIsHidden(), data->GetPipelineId().ref(),
|
||||
// the iframe. That happens in WebRenderCompositableHolder.s2);
|
||||
aBuilder.PushIFrame(bounds, !BackfaceIsHidden(),
|
||||
data->GetPipelineId().ref(),
|
||||
/*ignoreMissingPipelines*/ false);
|
||||
|
||||
LayoutDeviceRect scBounds(LayoutDevicePoint(0, 0), bounds.Size());
|
||||
|
|
|
@ -1413,7 +1413,7 @@ bool nsDisplayRemote::CreateWebRenderCommands(
|
|||
auto rect = LayoutDeviceRect::FromAppUnits(destRect, auPerDevPixel);
|
||||
rect += mOffset;
|
||||
|
||||
aBuilder.PushIFrame(mozilla::wr::ToLayoutRect(rect), !BackfaceIsHidden(),
|
||||
aBuilder.PushIFrame(rect, !BackfaceIsHidden(),
|
||||
mozilla::wr::AsPipelineId(mPaintData.mLayersId),
|
||||
/*ignoreMissingPipelines*/ true);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче