Backed out changeset a8ca75f3002d (bug 1633985) on request by dev

This commit is contained in:
Daniel Varga 2020-04-30 01:58:25 +03:00
parent 6a11b1827e
commit d0212aae27
11 changed files with 25 additions and 28 deletions

View File

@ -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, mPipelineId.ref(),
aBuilder.PushIFrame(r, aIsBackfaceVisible, mPipelineId.ref(),
/*ignoreMissingPipelines*/ false);
WrBridge()->AddWebRenderParentCommand(

View File

@ -1315,11 +1315,12 @@ 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),
mCurrentSpaceAndClipChain.space, aPipeline,
aIsBackfaceVisible, &mCurrentSpaceAndClipChain, aPipeline,
aIgnoreMissingPipeline);
}

View File

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

View File

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

View File

@ -83,13 +83,7 @@ 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.spatial_id,
sub_pipeline_id,
false,
);
builder.push_iframe(sub_bounds, sub_bounds, &space_and_clip, sub_pipeline_id, false);
builder.pop_stacking_context();
builder.pop_reference_frame();
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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