Add profiling to image decoding.

This extracts some independently useful parts of
<https://github.com/servo/servo/pull/4215>.
This commit is contained in:
Ankit Agrawal 2014-12-03 16:43:12 -05:00 committed by Ms2ger
parent b84f620b26
commit c8de895094
4 changed files with 46 additions and 24 deletions

View file

@ -94,9 +94,11 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
// image load or we risk emitting an output file missing the
// image.
let image_cache_task = if opts.output_file.is_some() {
ImageCacheTask::new_sync(resource_task.clone(), shared_task_pool)
ImageCacheTask::new_sync(resource_task.clone(), shared_task_pool,
time_profiler_chan_clone.clone())
} else {
ImageCacheTask::new(resource_task.clone(), shared_task_pool)
ImageCacheTask::new(resource_task.clone(), shared_task_pool,
time_profiler_chan_clone.clone())
};
let font_cache_task = FontCacheTask::new(resource_task.clone());
let storage_task: StorageTask = StorageTaskFactory::new();