зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1351506. Remove display list copy from wr_api_finalize_builder. r=nical
The takes advantage of some new webrender api to eliminate a copy of the displaylist
This commit is contained in:
Родитель
e08bd7cbdb
Коммит
d4b306abb2
|
@ -1338,11 +1338,13 @@ pub unsafe extern "C" fn wr_api_finalize_builder(state: &mut WrState,
|
||||||
let frame_builder = mem::replace(&mut state.frame_builder,
|
let frame_builder = mem::replace(&mut state.frame_builder,
|
||||||
WebRenderFrameBuilder::new(state.pipeline_id));
|
WebRenderFrameBuilder::new(state.pipeline_id));
|
||||||
let (_, dl, aux) = frame_builder.dl_builder.finalize();
|
let (_, dl, aux) = frame_builder.dl_builder.finalize();
|
||||||
//XXX: get rid of the copies here
|
let (data, descriptor) = dl.into_data();
|
||||||
*dl_data = WrVecU8::from_vec(dl.data().to_owned());
|
*dl_data = WrVecU8::from_vec(data);
|
||||||
*dl_descriptor = dl.descriptor().clone();
|
*dl_descriptor = descriptor;
|
||||||
*aux_data = WrVecU8::from_vec(aux.data().to_owned());
|
|
||||||
*aux_descriptor = aux.descriptor().clone();
|
let (data, descriptor) = aux.into_data();
|
||||||
|
*aux_data = WrVecU8::from_vec(data);
|
||||||
|
*aux_descriptor = descriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|
Загрузка…
Ссылка в новой задаче