diff options
Diffstat (limited to 'components/metrics')
-rw-r--r-- | components/metrics/Cargo.toml | 1 | ||||
-rw-r--r-- | components/metrics/lib.rs | 21 |
2 files changed, 2 insertions, 20 deletions
diff --git a/components/metrics/Cargo.toml b/components/metrics/Cargo.toml index 7a05ee9b132..af186366721 100644 --- a/components/metrics/Cargo.toml +++ b/components/metrics/Cargo.toml @@ -10,7 +10,6 @@ name = "metrics" path = "lib.rs" [dependencies] -gfx = {path = "../gfx"} gfx_traits = {path = "../gfx_traits"} ipc-channel = "0.9" log = "0.3.5" diff --git a/components/metrics/lib.rs b/components/metrics/lib.rs index cacf057729c..59657738e57 100644 --- a/components/metrics/lib.rs +++ b/components/metrics/lib.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -extern crate gfx; extern crate gfx_traits; extern crate ipc_channel; #[macro_use] @@ -17,8 +16,7 @@ extern crate servo_config; extern crate servo_url; extern crate time; -use gfx::display_list::{DisplayItem, DisplayList}; -use gfx_traits::Epoch; +use gfx_traits::{Epoch, DisplayList}; use ipc_channel::ipc::IpcSender; use msg::constellation_msg::PipelineId; use profile_traits::time::{ProfilerChan, ProfilerCategory, send_profile_data}; @@ -324,24 +322,9 @@ impl PaintTimeMetrics { return; } - let mut is_contentful = false; - // Analyze the display list to figure out if this may be the first - // contentful paint (i.e. the display list contains items of type text, - // image, non-white canvas or SVG). - for item in &display_list.list { - match item { - &DisplayItem::Text(_) | - &DisplayItem::Image(_) => { - is_contentful = true; - break; - } - _ => (), - } - } - self.pending_metrics.borrow_mut().insert(epoch, ( profiler_metadata_factory.new_metadata(), - is_contentful, + display_list.is_contentful(), )); // Send the pending metric information to the compositor thread. |