mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Simplify PaintThread::create().
This commit is contained in:
parent
bcea0ada27
commit
36b6f397d4
1 changed files with 3 additions and 5 deletions
|
@ -392,7 +392,7 @@ impl<C> PaintThread<C> where C: PaintListener + Send + 'static {
|
||||||
chrome_to_paint_chan: Sender<ChromeToPaintMsg>,
|
chrome_to_paint_chan: Sender<ChromeToPaintMsg>,
|
||||||
layout_to_paint_port: Receiver<LayoutToPaintMsg>,
|
layout_to_paint_port: Receiver<LayoutToPaintMsg>,
|
||||||
chrome_to_paint_port: Receiver<ChromeToPaintMsg>,
|
chrome_to_paint_port: Receiver<ChromeToPaintMsg>,
|
||||||
compositor: C,
|
mut compositor: C,
|
||||||
panic_chan: IpcSender<PanicMsg>,
|
panic_chan: IpcSender<PanicMsg>,
|
||||||
font_cache_thread: FontCacheThread,
|
font_cache_thread: FontCacheThread,
|
||||||
time_profiler_chan: time::ProfilerChan,
|
time_profiler_chan: time::ProfilerChan,
|
||||||
|
@ -404,10 +404,8 @@ impl<C> PaintThread<C> where C: PaintListener + Send + 'static {
|
||||||
{
|
{
|
||||||
// Ensures that the paint thread and graphics context are destroyed before the
|
// Ensures that the paint thread and graphics context are destroyed before the
|
||||||
// shutdown message.
|
// shutdown message.
|
||||||
let mut compositor = compositor;
|
let native_display = compositor.native_display();
|
||||||
let native_display = compositor.native_display().map(
|
let worker_threads = WorkerThreadProxy::spawn(native_display,
|
||||||
|display| display);
|
|
||||||
let worker_threads = WorkerThreadProxy::spawn(native_display.clone(),
|
|
||||||
font_cache_thread,
|
font_cache_thread,
|
||||||
time_profiler_chan.clone());
|
time_profiler_chan.clone());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue