aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/canvas_paint_thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/canvas/canvas_paint_thread.rs')
-rw-r--r--components/canvas/canvas_paint_thread.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/canvas/canvas_paint_thread.rs b/components/canvas/canvas_paint_thread.rs
index d4d2bb877c7..37ccace4592 100644
--- a/components/canvas/canvas_paint_thread.rs
+++ b/components/canvas/canvas_paint_thread.rs
@@ -234,6 +234,10 @@ impl<'a> CanvasPaintThread<'a> {
Canvas2dMsg::Ellipse(ref center, radius_x, radius_y, rotation, start, end, ccw) => self
.canvas(canvas_id)
.ellipse(center, radius_x, radius_y, rotation, start, end, ccw),
+ Canvas2dMsg::MeasureText(text, sender) => {
+ let metrics = self.canvas(canvas_id).measure_text(text);
+ sender.send(metrics).unwrap();
+ },
Canvas2dMsg::RestoreContext => self.canvas(canvas_id).restore_context_state(),
Canvas2dMsg::SaveContext => self.canvas(canvas_id).save_context_state(),
Canvas2dMsg::SetLineWidth(width) => self.canvas(canvas_id).set_line_width(width),