diff options
Diffstat (limited to 'components/gfx/paint_thread.rs')
-rw-r--r-- | components/gfx/paint_thread.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/gfx/paint_thread.rs b/components/gfx/paint_thread.rs index b4ad2abd299..a06ef7ee7af 100644 --- a/components/gfx/paint_thread.rs +++ b/components/gfx/paint_thread.rs @@ -379,8 +379,7 @@ impl<C> PaintThread<C> where C: PaintListener + Send + 'static { font_cache_thread: FontCacheThread, time_profiler_chan: time::ProfilerChan, mem_profiler_chan: mem::ProfilerChan) { - thread::spawn_named(format!("PaintThread {:?}", id), - move || { + thread::spawn_named(format!("PaintThread {:?}", id), move || { thread_state::initialize(thread_state::PAINT); PipelineId::install(id); @@ -425,9 +424,9 @@ impl<C> PaintThread<C> where C: PaintListener + Send + 'static { let chrome_to_paint = &self.chrome_to_paint_port; select! { msg = layout_to_paint.recv() => - Msg::FromLayout(msg.unwrap()), + Msg::FromLayout(msg.expect("expected message from layout")), msg = chrome_to_paint.recv() => - Msg::FromChrome(msg.unwrap()) + Msg::FromChrome(msg.expect("expected message from chrome")) } }; @@ -685,11 +684,12 @@ impl WorkerThread { let mut paint_context = PaintContext { draw_target: draw_target.clone(), font_context: &mut self.font_context, - page_rect: Rect::from_untyped(&tile.page_rect), + page_rect: Rect::from_untyped(&tile.page_rect.translate(&paint_layer.display_list_origin)), screen_rect: Rect::from_untyped(&tile.screen_rect), clip_rect: None, transient_clip: None, layer_kind: layer_kind, + subpixel_offset: Point2D::zero(), }; // Apply the translation to paint the tile we want. |