Bug 1454042 - Allow missing pipeline information for cross-process iframes. r=sotaro

We should always have the pipeline information for in-process things like
async images, but for cross-process iframes we might not have the information
right away if the content process doesn't get around to sending it for a while.

MozReview-Commit-ID: 18F5nqilXoV

--HG--
extra : rebase_source : 610046cbaaefb38b8e11bda857fd64a00722df27
This commit is contained in:
Kartikaya Gupta 2018-05-18 10:31:18 -04:00
Родитель 7b870caf1a
Коммит 8e7e2dbdb4
7 изменённых файлов: 14 добавлений и 9 удалений

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

@ -214,7 +214,7 @@ WebRenderImageData::CreateAsyncImageWebRenderCommands(mozilla::wr::DisplayListBu
// where it will be done when we build the display list for the iframe.
// That happens in AsyncImagePipelineManager.
wr::LayoutRect r = wr::ToRoundedLayoutRect(aBounds);
aBuilder.PushIFrame(r, aIsBackfaceVisible, mPipelineId.ref());
aBuilder.PushIFrame(r, aIsBackfaceVisible, mPipelineId.ref(), /*ignoreMissingPipelines*/ false);
WrBridge()->AddWebRenderParentCommand(OpUpdateAsyncImagePipeline(mPipelineId.value(),
aSCBounds,

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

@ -1083,9 +1083,10 @@ DisplayListBuilder::PushYCbCrInterleavedImage(const wr::LayoutRect& aBounds,
void
DisplayListBuilder::PushIFrame(const wr::LayoutRect& aBounds,
bool aIsBackfaceVisible,
PipelineId aPipeline)
PipelineId aPipeline,
bool aIgnoreMissingPipeline)
{
wr_dp_push_iframe(mWrState, aBounds, aIsBackfaceVisible, aPipeline);
wr_dp_push_iframe(mWrState, aBounds, aIsBackfaceVisible, aPipeline, aIgnoreMissingPipeline);
}
void

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

@ -392,7 +392,8 @@ public:
void PushIFrame(const wr::LayoutRect& aBounds,
bool aIsBackfaceVisible,
wr::PipelineId aPipeline);
wr::PipelineId aPipeline,
bool aIgnoreMissingPipeline);
// XXX WrBorderSides are passed with Range.
// It is just to bypass compiler bug. See Bug 1357734.

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

@ -1862,13 +1862,14 @@ pub extern "C" fn wr_dp_pop_clip_and_scroll_info(state: &mut WrState) {
pub extern "C" fn wr_dp_push_iframe(state: &mut WrState,
rect: LayoutRect,
is_backface_visible: bool,
pipeline_id: WrPipelineId) {
pipeline_id: WrPipelineId,
ignore_missing_pipeline: bool) {
debug_assert!(unsafe { is_in_main_thread() });
let mut prim_info = LayoutPrimitiveInfo::new(rect);
prim_info.is_backface_visible = is_backface_visible;
prim_info.tag = state.current_tag;
state.frame_builder.dl_builder.push_iframe(&prim_info, pipeline_id, true);
state.frame_builder.dl_builder.push_iframe(&prim_info, pipeline_id, ignore_missing_pipeline);
}
#[no_mangle]

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

@ -1243,7 +1243,8 @@ WR_INLINE
void wr_dp_push_iframe(WrState *aState,
LayoutRect aRect,
bool aIsBackfaceVisible,
WrPipelineId aPipelineId)
WrPipelineId aPipelineId,
bool aIgnoreMissingPipeline)
WR_FUNC;
WR_INLINE

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

@ -173,7 +173,7 @@ public:
// That happens in WebRenderCompositableHolder.
wr::LayoutRect r = wr::ToRoundedLayoutRect(bounds);
aBuilder.PushIFrame(r, !BackfaceIsHidden(), data->GetPipelineId().ref());
aBuilder.PushIFrame(r, !BackfaceIsHidden(), data->GetPipelineId().ref(), /*ignoreMissingPipelines*/ false);
gfx::Matrix4x4 scTransform;
gfxRect destGFXRect = mFrame->PresContext()->AppUnitsToGfxUnits(dest);

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

@ -390,7 +390,8 @@ nsDisplayRemote::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuild
aBuilder.PushIFrame(mozilla::wr::ToRoundedLayoutRect(rect),
!BackfaceIsHidden(),
mozilla::wr::AsPipelineId(GetRemoteLayersId()));
mozilla::wr::AsPipelineId(GetRemoteLayersId()),
/*ignoreMissingPipelines*/ true);
return true;
}