From 36b6f397d46d21e7a47bc006b63ad83abcede309 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 19 May 2016 17:49:49 +0200 Subject: [PATCH] Simplify PaintThread::create(). --- components/gfx/paint_thread.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/components/gfx/paint_thread.rs b/components/gfx/paint_thread.rs index 0a4ed4383bd..51cddfb008e 100644 --- a/components/gfx/paint_thread.rs +++ b/components/gfx/paint_thread.rs @@ -392,7 +392,7 @@ impl PaintThread where C: PaintListener + Send + 'static { chrome_to_paint_chan: Sender, layout_to_paint_port: Receiver, chrome_to_paint_port: Receiver, - compositor: C, + mut compositor: C, panic_chan: IpcSender, font_cache_thread: FontCacheThread, time_profiler_chan: time::ProfilerChan, @@ -404,10 +404,8 @@ impl PaintThread where C: PaintListener + Send + 'static { { // Ensures that the paint thread and graphics context are destroyed before the // shutdown message. - let mut compositor = compositor; - let native_display = compositor.native_display().map( - |display| display); - let worker_threads = WorkerThreadProxy::spawn(native_display.clone(), + let native_display = compositor.native_display(); + let worker_threads = WorkerThreadProxy::spawn(native_display, font_cache_thread, time_profiler_chan.clone());