Bug 1633985 - Remove unused clip parent and backface flag from push_iframe r=kats,nical

Differential Revision: https://phabricator.services.mozilla.com/D73006
This commit is contained in:
Glenn Watson 2020-04-29 21:54:14 +00:00
Родитель 8bab2b55c6
Коммит ab3883a1e7
11 изменённых файлов: 28 добавлений и 25 удалений

Просмотреть файл

@ -266,7 +266,7 @@ void WebRenderImageData::CreateAsyncImageWebRenderCommands(
// 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(r, mPipelineId.ref(),
/*ignoreMissingPipelines*/ false);
WrBridge()->AddWebRenderParentCommand(

Просмотреть файл

@ -1315,12 +1315,11 @@ void DisplayListBuilder::PushYCbCrInterleavedImage(
}
void DisplayListBuilder::PushIFrame(const wr::LayoutRect& aBounds,
bool aIsBackfaceVisible,
PipelineId aPipeline,
bool aIgnoreMissingPipeline) {
mRemotePipelineIds.AppendElement(aPipeline);
wr_dp_push_iframe(mWrState, aBounds, MergeClipLeaf(aBounds),
aIsBackfaceVisible, &mCurrentSpaceAndClipChain, aPipeline,
mCurrentSpaceAndClipChain.space, aPipeline,
aIgnoreMissingPipeline);
}

Просмотреть файл

@ -541,8 +541,8 @@ class DisplayListBuilder final {
wr::WrColorRange aColorRange, wr::ImageRendering aFilter,
bool aPreferCompositorSurface = false);
void PushIFrame(const wr::LayoutRect& aBounds, bool aIsBackfaceVisible,
wr::PipelineId aPipeline, bool aIgnoreMissingPipeline);
void PushIFrame(const wr::LayoutRect& aBounds, wr::PipelineId aPipeline,
bool aIgnoreMissingPipeline);
// XXX WrBorderSides are passed with Range.
// It is just to bypass compiler bug. See Bug 1357734.

Просмотреть файл

@ -2546,8 +2546,7 @@ pub extern "C" fn wr_dp_push_iframe(
state: &mut WrState,
rect: LayoutRect,
clip: LayoutRect,
_is_backface_visible: bool,
parent: &WrSpaceAndClipChain,
spatial_id: WrSpatialId,
pipeline_id: WrPipelineId,
ignore_missing_pipeline: bool,
) {
@ -2556,7 +2555,7 @@ pub extern "C" fn wr_dp_push_iframe(
state.frame_builder.dl_builder.push_iframe(
rect,
clip,
&parent.to_webrender(state.pipeline_id),
spatial_id.to_webrender(state.pipeline_id),
pipeline_id,
ignore_missing_pipeline,
);

Просмотреть файл

@ -83,7 +83,13 @@ impl Example for App {
sub_bounds,
ColorF::new(1.0, 0.0, 0.0, 1.0)
);
builder.push_iframe(sub_bounds, sub_bounds, &space_and_clip, sub_pipeline_id, false);
builder.push_iframe(
sub_bounds,
sub_bounds,
space_and_clip.spatial_id,
sub_pipeline_id,
false,
);
builder.pop_stacking_context();
builder.pop_reference_frame();
}

Просмотреть файл

@ -952,14 +952,16 @@ impl<'a> SceneBuilder<'a> {
},
};
let space_and_clip = SpaceAndClipInfo {
spatial_id: info.spatial_id,
clip_id: ClipId::root(self.scene.root_pipeline_id.unwrap()),
};
let current_offset = self.current_offset(spatial_node_index);
let clip_chain_index = self.add_clip_node(
let clip_chain_index = self.add_rect_clip_node(
ClipId::root(iframe_pipeline_id),
&info.space_and_clip,
ClipRegion::create_for_clip_node_with_local_clip(
&info.clip_rect,
&current_offset,
),
&space_and_clip,
&info.clip_rect.translate(current_offset),
);
self.pipeline_clip_chain_stack.push(clip_chain_index);
@ -1376,7 +1378,7 @@ impl<'a> SceneBuilder<'a> {
);
}
DisplayItem::Iframe(ref info) => {
let space = self.get_space(&info.space_and_clip.spatial_id);
let space = self.get_space(&info.spatial_id);
self.build_iframe(
info,
space,

Просмотреть файл

@ -1136,7 +1136,7 @@ impl FilterData {
pub struct IframeDisplayItem {
pub bounds: LayoutRect,
pub clip_rect: LayoutRect,
pub space_and_clip: SpaceAndClipInfo,
pub spatial_id: SpatialId,
pub pipeline_id: PipelineId,
pub ignore_missing_pipeline: bool,
}

Просмотреть файл

@ -1836,14 +1836,14 @@ impl DisplayListBuilder {
&mut self,
bounds: LayoutRect,
clip_rect: LayoutRect,
space_and_clip: &di::SpaceAndClipInfo,
spatial_id: di::SpatialId,
pipeline_id: PipelineId,
ignore_missing_pipeline: bool
) {
let item = di::DisplayItem::Iframe(di::IframeDisplayItem {
bounds,
clip_rect,
space_and_clip: *space_and_clip,
spatial_id,
pipeline_id,
ignore_missing_pipeline,
});

Просмотреть файл

@ -1624,10 +1624,7 @@ impl YamlFrameReader {
dl.push_iframe(
bounds,
info.clip_rect,
&SpaceAndClipInfo {
spatial_id: info.spatial_id,
clip_id: info.clip_id
},
info.spatial_id,
pipeline_id,
ignore
);

Просмотреть файл

@ -162,7 +162,7 @@ class nsDisplayCanvas final : public nsPaintedDisplayItem {
// the iframe. That happens in WebRenderCompositableHolder.
wr::LayoutRect r = wr::ToLayoutRect(bounds);
aBuilder.PushIFrame(r, !BackfaceIsHidden(), data->GetPipelineId().ref(),
aBuilder.PushIFrame(r, data->GetPipelineId().ref(),
/*ignoreMissingPipelines*/ false);
gfx::Matrix4x4 scTransform;

Просмотреть файл

@ -1445,7 +1445,7 @@ bool nsDisplayRemote::CreateWebRenderCommands(
contentRect, mFrame->PresContext()->AppUnitsPerDevPixel());
rect += mOffset;
aBuilder.PushIFrame(mozilla::wr::ToLayoutRect(rect), !BackfaceIsHidden(),
aBuilder.PushIFrame(mozilla::wr::ToLayoutRect(rect),
mozilla::wr::AsPipelineId(mLayersId),
/*ignoreMissingPipelines*/ true);