зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 3a8d5795c985 (bug 1616335) for tidy bustage on display_list.rs. CLOSED TREE
This commit is contained in:
Родитель
30fc2949d8
Коммит
a15f9174ec
|
@ -334,11 +334,6 @@ void WebRenderLayerManager::EndTransactionWithoutLayer(
|
|||
printf_stderr("-- WebRender display list build --\n");
|
||||
}
|
||||
|
||||
if (XRE_IsContentProcess() &&
|
||||
StaticPrefs::gfx_webrender_dl_dump_content_serialized()) {
|
||||
builder.DumpSerializedDisplayList();
|
||||
}
|
||||
|
||||
if (aDisplayList) {
|
||||
MOZ_ASSERT(aDisplayListBuilder && !aBackground);
|
||||
// Record the time spent "layerizing". WR doesn't actually layerize but
|
||||
|
|
|
@ -938,10 +938,6 @@ usize DisplayListBuilder::Dump(usize aIndent, const Maybe<usize>& aStart,
|
|||
aEnd.ptrOr(nullptr));
|
||||
}
|
||||
|
||||
void DisplayListBuilder::DumpSerializedDisplayList() {
|
||||
wr_dump_serialized_display_list(mWrState);
|
||||
}
|
||||
|
||||
void DisplayListBuilder::Finalize(wr::LayoutSize& aOutContentSize,
|
||||
BuiltDisplayList& aOutDisplayList) {
|
||||
wr_api_finalize_builder(mWrState, &aOutContentSize, &aOutDisplayList.dl_desc,
|
||||
|
|
|
@ -405,7 +405,6 @@ class DisplayListBuilder final {
|
|||
|
||||
usize Dump(usize aIndent, const Maybe<usize>& aStart,
|
||||
const Maybe<usize>& aEnd);
|
||||
void DumpSerializedDisplayList();
|
||||
|
||||
void Finalize(wr::LayoutSize& aOutContentSizes,
|
||||
wr::BuiltDisplayList& aOutDisplayList);
|
||||
|
|
|
@ -3613,11 +3613,6 @@ pub extern "C" fn wr_dump_display_list(state: &mut WrState,
|
|||
index
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wr_dump_serialized_display_list(state: &mut WrState) {
|
||||
state.frame_builder.dl_builder.dump_serialized_display_list();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn wr_api_finalize_builder(state: &mut WrState,
|
||||
content_size: &mut LayoutSize,
|
||||
|
|
|
@ -10,7 +10,7 @@ use serde::de::Deserializer;
|
|||
#[cfg(feature = "serialize")]
|
||||
use serde::ser::{Serializer, SerializeSeq};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::io::Write;
|
||||
use std::io::{stdout, Write};
|
||||
use std::marker::PhantomData;
|
||||
use std::ops::Range;
|
||||
use std::mem;
|
||||
|
@ -925,7 +925,6 @@ pub struct DisplayListBuilder {
|
|||
save_state: Option<SaveState>,
|
||||
|
||||
cache_size: usize,
|
||||
serialized_content_buffer: Option<String>,
|
||||
}
|
||||
|
||||
impl DisplayListBuilder {
|
||||
|
@ -955,7 +954,6 @@ impl DisplayListBuilder {
|
|||
content_size,
|
||||
save_state: None,
|
||||
cache_size: 0,
|
||||
serialized_content_buffer: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -997,6 +995,11 @@ impl DisplayListBuilder {
|
|||
self.save_state.take().expect("No save to clear in DisplayListBuilder");
|
||||
}
|
||||
|
||||
/// Print the display items in the list to stdout.
|
||||
pub fn print_display_list(&mut self) {
|
||||
self.emit_display_list(0, Range { start: None, end: None }, stdout());
|
||||
}
|
||||
|
||||
/// Emits a debug representation of display items in the list, for debugging
|
||||
/// purposes. If the range's start parameter is specified, only display
|
||||
/// items starting at that index (inclusive) will be printed. If the range's
|
||||
|
@ -1043,11 +1046,6 @@ impl DisplayListBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
/// Print the display items in the list to stdout.
|
||||
pub fn dump_serialized_display_list(&mut self) {
|
||||
self.serialized_content_buffer = Some(String::new());
|
||||
}
|
||||
|
||||
/// Add an item to the display list.
|
||||
///
|
||||
/// NOTE: It is usually preferable to use the specialized methods to push
|
||||
|
@ -1056,11 +1054,6 @@ impl DisplayListBuilder {
|
|||
#[inline]
|
||||
pub fn push_item(&mut self, item: &di::DisplayItem) {
|
||||
poke_into_vec(item, self.active_buffer());
|
||||
|
||||
if let Some(ref mut content) = self.serialized_content_buffer {
|
||||
use std::fmt::Write;
|
||||
write!(content, "{:?}\n", item).expect("DL dump write failed.");
|
||||
}
|
||||
}
|
||||
|
||||
fn push_iter_impl<I>(data: &mut Vec<u8>, iter_source: I)
|
||||
|
@ -1761,11 +1754,6 @@ impl DisplayListBuilder {
|
|||
pub fn finalize(mut self) -> (PipelineId, LayoutSize, BuiltDisplayList) {
|
||||
assert!(self.save_state.is_none(), "Finalized DisplayListBuilder with a pending save");
|
||||
|
||||
if let Some(content) = self.serialized_content_buffer.take() {
|
||||
println!("-- WebRender display list for {:?} --\n{}",
|
||||
self.pipeline_id, content);
|
||||
}
|
||||
|
||||
// Add `DisplayItem::max_size` zone of zeroes to the end of display list
|
||||
// so there is at least this amount available in the display list during
|
||||
// serialization.
|
||||
|
|
|
@ -3860,11 +3860,6 @@
|
|||
value: false
|
||||
mirror: always
|
||||
|
||||
- name: gfx.webrender.dl.dump-content-serialized
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
# Also expose a pref to allow users to force-disable WR. This is exposed
|
||||
# on all channels because WR can be enabled on qualified hardware on all
|
||||
# channels.
|
||||
|
|
Загрузка…
Ссылка в новой задаче