diff options
author | Ms2ger <Ms2ger@gmail.com> | 2015-11-06 13:10:37 +0100 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2015-11-09 09:03:50 +0100 |
commit | ff0acccc061c0894e40bbda4b318bc7ab8615367 (patch) | |
tree | b2bcf9531dd3f296eafbb017c90570a76779b28c /components/layout/layout_task.rs | |
parent | 3780fb7fe02ed66bd391421a0c5506b5635279dd (diff) | |
download | servo-ff0acccc061c0894e40bbda4b318bc7ab8615367.tar.gz servo-ff0acccc061c0894e40bbda4b318bc7ab8615367.zip |
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.
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r-- | components/layout/layout_task.rs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 6347509ad90..a7a39233cc9 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -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 - })) + }, + }) } } |