mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
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:
parent
3780fb7fe0
commit
ff0acccc06
8 changed files with 28 additions and 37 deletions
|
@ -44,7 +44,7 @@ use opaque_node::OpaqueNodeMethods;
|
|||
use parallel::{self, WorkQueueData};
|
||||
use profile_traits::mem::{self, Report, ReportKind, ReportsChan};
|
||||
use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType};
|
||||
use profile_traits::time::{self, ProfilerMetadata, profile};
|
||||
use profile_traits::time::{self, TimerMetadata, profile};
|
||||
use query::{LayoutRPCImpl, process_content_box_request, process_content_boxes_request};
|
||||
use query::{MarginPadding, MarginRetrievingFragmentBorderBoxIterator, PositionProperty};
|
||||
use query::{PositionRetrievingFragmentBorderBoxIterator, Side};
|
||||
|
@ -1434,18 +1434,20 @@ impl LayoutTask {
|
|||
}
|
||||
|
||||
/// Returns profiling information which is passed to the time profiler.
|
||||
fn profiler_metadata(&self) -> ProfilerMetadata {
|
||||
Some((&self.url,
|
||||
if self.is_iframe {
|
||||
fn profiler_metadata(&self) -> Option<TimerMetadata> {
|
||||
Some(TimerMetadata {
|
||||
url: self.url.serialize(),
|
||||
iframe: if self.is_iframe {
|
||||
TimerMetadataFrameType::IFrame
|
||||
} else {
|
||||
} else {
|
||||
TimerMetadataFrameType::RootWindow
|
||||
},
|
||||
if self.first_reflow.get() {
|
||||
},
|
||||
incremental: if self.first_reflow.get() {
|
||||
TimerMetadataReflowType::FirstReflow
|
||||
} else {
|
||||
} else {
|
||||
TimerMetadataReflowType::Incremental
|
||||
}))
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ use context::{LayoutContext, SharedLayoutContext};
|
|||
use flow::{self, Flow, MutableFlowUtils, PostorderFlowTraversal, PreorderFlowTraversal};
|
||||
use flow_ref::{self, FlowRef};
|
||||
use gfx::display_list::OpaqueNode;
|
||||
use profile_traits::time::{self, ProfilerMetadata, profile};
|
||||
use profile_traits::time::{self, TimerMetadata, profile};
|
||||
use std::mem;
|
||||
use std::sync::atomic::{AtomicIsize, Ordering};
|
||||
use traversal::PostorderNodeMutTraversal;
|
||||
|
@ -465,7 +465,7 @@ pub fn traverse_dom_preorder(root: LayoutNode,
|
|||
|
||||
pub fn traverse_flow_tree_preorder(
|
||||
root: &mut FlowRef,
|
||||
profiler_metadata: ProfilerMetadata,
|
||||
profiler_metadata: Option<TimerMetadata>,
|
||||
time_profiler_chan: time::ProfilerChan,
|
||||
shared_layout_context: &SharedLayoutContext,
|
||||
queue: &mut WorkQueue<SharedLayoutContext, WorkQueueData>) {
|
||||
|
@ -488,7 +488,7 @@ pub fn traverse_flow_tree_preorder(
|
|||
|
||||
pub fn build_display_list_for_subtree(
|
||||
root: &mut FlowRef,
|
||||
profiler_metadata: ProfilerMetadata,
|
||||
profiler_metadata: Option<TimerMetadata>,
|
||||
time_profiler_chan: time::ProfilerChan,
|
||||
shared_layout_context: &SharedLayoutContext,
|
||||
queue: &mut WorkQueue<SharedLayoutContext, WorkQueueData>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue