зеркало из 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,
|
||||
WebRenderFrameBuilder::new(state.pipeline_id));
|
||||
let (_, dl, aux) = frame_builder.dl_builder.finalize();
|
||||
//XXX: get rid of the copies here
|
||||
*dl_data = WrVecU8::from_vec(dl.data().to_owned());
|
||||
*dl_descriptor = dl.descriptor().clone();
|
||||
*aux_data = WrVecU8::from_vec(aux.data().to_owned());
|
||||
*aux_descriptor = aux.descriptor().clone();
|
||||
let (data, descriptor) = dl.into_data();
|
||||
*dl_data = WrVecU8::from_vec(data);
|
||||
*dl_descriptor = descriptor;
|
||||
|
||||
let (data, descriptor) = aux.into_data();
|
||||
*aux_data = WrVecU8::from_vec(data);
|
||||
*aux_descriptor = descriptor;
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
Загрузка…
Ссылка в новой задаче