зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1342833 - WebRenderBridgeParent::ClearResources() does not clear DisplayList r=jrmuizel
This commit is contained in:
Родитель
48fb1c4b1e
Коммит
99e7d5243f
|
@ -570,6 +570,10 @@ WebRenderBridgeParent::ScheduleComposition()
|
|||
void
|
||||
WebRenderBridgeParent::ClearResources()
|
||||
{
|
||||
if (mApi) {
|
||||
++mWrEpoch; // Update webrender epoch
|
||||
mApi->ClearRootDisplayList(wr::NewEpoch(mWrEpoch), mPipelineId);
|
||||
}
|
||||
DeleteOldImages();
|
||||
if (mCompositableHolder) {
|
||||
for (auto iter = mExternalImageIds.Iter(); !iter.Done(); iter.Next()) {
|
||||
|
|
|
@ -184,6 +184,13 @@ WebRenderAPI::SetRootDisplayList(gfx::Color aBgColor,
|
|||
aux_size);
|
||||
}
|
||||
|
||||
void
|
||||
WebRenderAPI::ClearRootDisplayList(Epoch aEpoch,
|
||||
WrPipelineId pipeline_id)
|
||||
{
|
||||
wr_api_clear_root_display_list(mWrApi, aEpoch, pipeline_id);
|
||||
}
|
||||
|
||||
void
|
||||
WebRenderAPI::Readback(gfx::IntSize size,
|
||||
uint8_t *buffer,
|
||||
|
|
|
@ -56,6 +56,9 @@ public:
|
|||
uint8_t *aux_data,
|
||||
size_t aux_size);
|
||||
|
||||
void ClearRootDisplayList(Epoch aEpoch,
|
||||
WrPipelineId pipeline_id);
|
||||
|
||||
void SetRootPipeline(wr::PipelineId aPipeline);
|
||||
|
||||
void AddImage(wr::ImageKey aKey,
|
||||
|
|
|
@ -258,6 +258,22 @@ pub unsafe extern fn wr_api_set_root_display_list(api: &mut RenderApi,
|
|||
preserve_frame_state);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn wr_api_clear_root_display_list(api: &mut RenderApi,
|
||||
epoch: Epoch,
|
||||
pipeline_id: PipelineId) {
|
||||
let root_background_color = ColorF::new(0.3, 0.0, 0.0, 1.0);
|
||||
let preserve_frame_state = true;
|
||||
let frame_builder = WebRenderFrameBuilder::new(pipeline_id);
|
||||
|
||||
api.set_root_display_list(Some(root_background_color),
|
||||
epoch,
|
||||
LayoutSize::new(0.0, 0.0),
|
||||
frame_builder.dl_builder.finalize(),
|
||||
preserve_frame_state);
|
||||
}
|
||||
|
||||
|
||||
#[no_mangle]
|
||||
pub extern fn wr_api_generate_frame(api: &mut RenderApi) {
|
||||
api.generate_frame(None);
|
||||
|
|
|
@ -476,6 +476,10 @@ wr_api_set_root_display_list(WrAPI* api, WrEpoch epoch, float w, float h,
|
|||
size_t aux_size)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_api_clear_root_display_list(WrAPI* api, WrEpoch epoch, WrPipelineId pipeline_id)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_api_generate_frame(WrAPI* api)
|
||||
WR_FUNC;
|
||||
|
|
Загрузка…
Ссылка в новой задаче