diff options
author | Nicholas Nethercote <nnethercote@mozilla.com> | 2015-03-22 15:20:31 -0700 |
---|---|---|
committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2015-03-25 16:00:23 -0700 |
commit | ce36e574f4f404d7b0c8d15d3d55ea62fca8deb6 (patch) | |
tree | f414f6c9095ccebaa241bac7a030cc41f8bd5b52 /components/gfx/paint_task.rs | |
parent | 7f587f6cb56b1dae1a56dec36754007ef4d376ac (diff) | |
download | servo-ce36e574f4f404d7b0c8d15d3d55ea62fca8deb6.tar.gz servo-ce36e574f4f404d7b0c8d15d3d55ea62fca8deb6.zip |
Rename lots of profiling-related things.
------------------------------------------------------------------------
BEFORE AFTER
------------------------------------------------------------------------
util::memory util::mem
- heap_size_of - heap_size_of (unchanged)
- SizeOf - HeapSizeOf
- size_of_excluding_self - heap_size_of_children
prof::mem prof::mem
- MemoryProfilerChan - ProfilerChan
- MemoryReport - Report
- MemoryReportsChan - ReportsChan
- MemoryReporter - Reporter
- MemoryProfilerMsg - ProfilerMsg
- {R,UnR}egisterMemoryReporter - {R,UnR}egisterReporter
- MemoryProfiler - Prof
- ReportsForest - ReportsForest (unchanged)
- ReportsTree - ReportsTree (unchanged)
- SystemMemoryReporter - SystemReporter
prof::time prof::time
- TimeProfilerChan - ProfilerChan
- TimerMetadata - TimerMetadata (unchanged)
- Formatable - Formattable [spelling!]
- TimeProfilerMsg - ProfilerMsg
- TimeProfilerCategory - ProfilerCategory
- TimeProfilerBuckets - ProfilerBuckets
- TimeProfiler - Profiler
- TimerMetadataFrameType - TimerMetadataFrameType (unchanged)
- TimerMetadataReflowType - TimerMetadataReflowType (unchanged)
- ProfilerMetadata - ProfilerMetadata (unchanged)
In a few places both prof::time and prof::mem are used, and so
module-qualification is needed to avoid overlap, e.g. time::Profiler and
mem::Profiler. Likewise with std::mem and prof::mem. This is not a big
deal.
Diffstat (limited to 'components/gfx/paint_task.rs')
-rw-r--r-- | components/gfx/paint_task.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/components/gfx/paint_task.rs b/components/gfx/paint_task.rs index 8548161d165..470bea78e7b 100644 --- a/components/gfx/paint_task.rs +++ b/components/gfx/paint_task.rs @@ -25,7 +25,7 @@ use msg::compositor_msg::{LayerMetadata, PaintListener, ScrollPolicy}; use msg::constellation_msg::Msg as ConstellationMsg; use msg::constellation_msg::{ConstellationChan, Failure, PipelineId}; use msg::constellation_msg::PipelineExitType; -use profile::time::{TimeProfilerChan, TimeProfilerCategory, profile}; +use profile::time::{self, profile}; use skia::SkiaGrGLNativeContextRef; use std::mem; use std::thread::Builder; @@ -101,7 +101,7 @@ pub struct PaintTask<C> { constellation_chan: ConstellationChan, /// A channel to the time profiler. - time_profiler_chan: TimeProfilerChan, + time_profiler_chan: time::ProfilerChan, /// The native graphics context. native_graphics_context: Option<NativePaintingGraphicsContext>, @@ -141,7 +141,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send + 'static { constellation_chan: ConstellationChan, font_cache_task: FontCacheTask, failure_msg: Failure, - time_profiler_chan: TimeProfilerChan, + time_profiler_chan: time::ProfilerChan, shutdown_chan: Sender<()>) { let ConstellationChan(c) = constellation_chan.clone(); spawn_named_with_send_on_failure("PaintTask", task_state::PAINT, move || { @@ -336,7 +336,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send + 'static { mut tiles: Vec<BufferRequest>, scale: f32, layer_id: LayerId) { - profile(TimeProfilerCategory::Painting, None, self.time_profiler_chan.clone(), || { + profile(time::ProfilerCategory::Painting, None, self.time_profiler_chan.clone(), || { // Bail out if there is no appropriate stacking context. let stacking_context = if let Some(ref stacking_context) = self.root_stacking_context { match display_list::find_stacking_context_with_layer_id(stacking_context, @@ -419,7 +419,7 @@ struct WorkerThreadProxy { impl WorkerThreadProxy { fn spawn(native_graphics_metadata: Option<NativeGraphicsMetadata>, font_cache_task: FontCacheTask, - time_profiler_chan: TimeProfilerChan) + time_profiler_chan: time::ProfilerChan) -> Vec<WorkerThreadProxy> { let thread_count = if opts::get().gpu_painting { 1 @@ -472,7 +472,7 @@ struct WorkerThread { receiver: Receiver<MsgToWorkerThread>, native_graphics_context: Option<NativePaintingGraphicsContext>, font_context: Box<FontContext>, - time_profiler_sender: TimeProfilerChan, + time_profiler_sender: time::ProfilerChan, } impl WorkerThread { @@ -480,7 +480,7 @@ impl WorkerThread { receiver: Receiver<MsgToWorkerThread>, native_graphics_metadata: Option<NativeGraphicsMetadata>, font_cache_task: FontCacheTask, - time_profiler_sender: TimeProfilerChan) + time_profiler_sender: time::ProfilerChan) -> WorkerThread { WorkerThread { sender: sender, @@ -559,7 +559,7 @@ impl WorkerThread { paint_context.clear(); // Draw the display list. - profile(TimeProfilerCategory::PaintingPerTile, None, + profile(time::ProfilerCategory::PaintingPerTile, None, self.time_profiler_sender.clone(), || { stacking_context.optimize_and_draw_into_context(&mut paint_context, &tile_bounds, |