aboutsummaryrefslogtreecommitdiffstats
path: root/components/metrics/lib.rs
diff options
context:
space:
mode:
authorGeorg Streich <georg.streich@bluewin.ch>2018-01-15 16:25:51 +0100
committerGeorg Streich <georg.streich@bluewin.ch>2018-01-15 16:25:51 +0100
commit4b7cb2080e37a8992eb95824753829a36810522f (patch)
tree9a87378159b26d307444f561c28ef4fbc1cb2cc9 /components/metrics/lib.rs
parent75f39b42abc88a2597186fe845d2deaa15bdb6da (diff)
downloadservo-4b7cb2080e37a8992eb95824753829a36810522f.tar.gz
servo-4b7cb2080e37a8992eb95824753829a36810522f.zip
Decoupled gfx and metrics
Diffstat (limited to 'components/metrics/lib.rs')
-rw-r--r--components/metrics/lib.rs21
1 files changed, 2 insertions, 19 deletions
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.