Bug 1637300 - Further reduce unnecessary scene building. r=gw

Differential Revision: https://phabricator.services.mozilla.com/D74881
This commit is contained in:
Nicolas Silva 2020-05-14 12:40:49 +00:00
Родитель e5c6044cc3
Коммит 723ecc70b6
1 изменённых файлов: 9 добавлений и 3 удалений

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

@ -633,7 +633,6 @@ impl SceneBuilderThread {
list_data,
preserve_frame_state,
} => {
rebuild_scene = true;
let built_display_list =
BuiltDisplayList::from_data(list_data, list_descriptor);
let display_list_len = built_display_list.data().len();
@ -645,6 +644,11 @@ impl SceneBuilderThread {
continue;
}
// Note: We could further reduce the amount of unnecessary scene
// building by keeping track of which pipelines are used by the
// scene (bug 1490751).
rebuild_scene = true;
scene.set_display_list(
pipeline_id,
epoch,
@ -669,8 +673,10 @@ impl SceneBuilderThread {
}
}
SceneMsg::SetRootPipeline(pipeline_id) => {
rebuild_scene = true;
scene.set_root_pipeline_id(pipeline_id);
if scene.root_pipeline_id != Some(pipeline_id) {
rebuild_scene = true;
scene.set_root_pipeline_id(pipeline_id);
}
}
SceneMsg::RemovePipeline(pipeline_id) => {
scene.remove_pipeline(pipeline_id);