aboutsummaryrefslogtreecommitdiffstats
path: root/components/compositing/pipeline.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-05-19 19:15:08 -0700
committerbors-servo <lbergstrom+bors@mozilla.com>2016-05-19 19:15:08 -0700
commitbcea0ada27de694cd0c465d04fd35eba70503d62 (patch)
tree9a604ff41983c9bded331f4ec80f94c9f6b1cd45 /components/compositing/pipeline.rs
parent051a749e0d0ff298a3cbce8c6284386dc0d67f24 (diff)
parenta51db4cfa857d7567ce1078830f5c00ea7bd9f59 (diff)
downloadservo-bcea0ada27de694cd0c465d04fd35eba70503d62.tar.gz
servo-bcea0ada27de694cd0c465d04fd35eba70503d62.zip
Auto merge of #11189 - izgzhen:refactor-resource-thread, r=nox
Refactor resource thread code - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because it is refactoring <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11189) <!-- Reviewable:end -->
Diffstat (limited to 'components/compositing/pipeline.rs')
-rw-r--r--components/compositing/pipeline.rs18
1 files changed, 6 insertions, 12 deletions
diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs
index 15550f99002..b1f76bd0ec0 100644
--- a/components/compositing/pipeline.rs
+++ b/components/compositing/pipeline.rs
@@ -16,10 +16,9 @@ use layers::geometry::DevicePixel;
use layout_traits::{LayoutControlChan, LayoutThreadFactory};
use msg::constellation_msg::{FrameId, LoadData, PanicMsg, PipelineId};
use msg::constellation_msg::{PipelineNamespaceId, SubpageId, WindowSizeData};
-use net_traits::ResourceThread;
+use net_traits::ResourceThreads;
use net_traits::bluetooth_thread::BluetoothMethodMsg;
use net_traits::image_cache_thread::ImageCacheThread;
-use net_traits::storage_thread::StorageThread;
use profile_traits::mem as profile_mem;
use profile_traits::time;
use script_traits::{ConstellationControlMsg, InitialScriptState, MozBrowserEvent};
@@ -98,10 +97,8 @@ pub struct InitialPipelineState {
pub image_cache_thread: ImageCacheThread,
/// A channel to the font cache thread.
pub font_cache_thread: FontCacheThread,
- /// A channel to the resource thread.
- pub resource_thread: ResourceThread,
- /// A channel to the storage thread.
- pub storage_thread: StorageThread,
+ /// Channels to the resource-related threads.
+ pub resource_threads: ResourceThreads,
/// A channel to the time profiler thread.
pub time_profiler_chan: time::ProfilerChan,
/// A channel to the memory profiler thread.
@@ -219,8 +216,7 @@ impl Pipeline {
bluetooth_thread: state.bluetooth_thread,
image_cache_thread: state.image_cache_thread,
font_cache_thread: state.font_cache_thread.clone(),
- resource_thread: state.resource_thread,
- storage_thread: state.storage_thread,
+ resource_threads: state.resource_threads,
time_profiler_chan: state.time_profiler_chan.clone(),
mem_profiler_chan: state.mem_profiler_chan.clone(),
window_size: window_size,
@@ -396,8 +392,7 @@ pub struct UnprivilegedPipelineContent {
bluetooth_thread: IpcSender<BluetoothMethodMsg>,
image_cache_thread: ImageCacheThread,
font_cache_thread: FontCacheThread,
- resource_thread: ResourceThread,
- storage_thread: StorageThread,
+ resource_threads: ResourceThreads,
time_profiler_chan: time::ProfilerChan,
mem_profiler_chan: profile_mem::ProfilerChan,
window_size: Option<WindowSizeData>,
@@ -435,8 +430,7 @@ impl UnprivilegedPipelineContent {
scheduler_chan: self.scheduler_chan.clone(),
panic_chan: self.panic_chan.clone(),
bluetooth_thread: self.bluetooth_thread.clone(),
- resource_thread: self.resource_thread,
- storage_thread: self.storage_thread.clone(),
+ resource_threads: self.resource_threads,
image_cache_thread: self.image_cache_thread.clone(),
time_profiler_chan: self.time_profiler_chan.clone(),
mem_profiler_chan: self.mem_profiler_chan.clone(),