Consolidate ProfilerMetadata and TimerMetadata.

There is no good reason to have the two types.

This also means that the result of LayoutTask::profiler_metadata no longer
borrows the LayoutTask, which I'll need later.
This commit is contained in:
Ms2ger 2015-11-06 13:10:37 +01:00
parent 3780fb7fe0
commit ff0acccc06
8 changed files with 28 additions and 37 deletions

View file

@ -8,6 +8,7 @@ use heartbeats;
use ipc_channel::ipc::{self, IpcReceiver};
use profile_traits::energy::{energy_interval_ms, read_energy_uj};
use profile_traits::time::{ProfilerCategory, ProfilerChan, ProfilerMsg, TimerMetadata};
use profile_traits::time::{TimerMetadataReflowType, TimerMetadataFrameType};
use std::borrow::ToOwned;
use std::cmp::Ordering;
use std::collections::BTreeMap;
@ -31,8 +32,14 @@ impl Formattable for Option<TimerMetadata> {
} else {
url
};
let incremental = if meta.incremental { " yes" } else { " no " };
let iframe = if meta.iframe { " yes" } else { " no " };
let incremental = match meta.incremental {
TimerMetadataReflowType::Incremental => " yes",
TimerMetadataReflowType::FirstReflow => " no ",
};
let iframe = match meta.iframe {
TimerMetadataFrameType::RootWindow => " yes",
TimerMetadataFrameType::IFrame => " no ",
};
format!(" {:14} {:9} {:30}", incremental, iframe, url)
},
None =>