From 2ad315a507c45092db509920efa472ca9db34419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Vald=C3=A9s?= Date: Sat, 22 Feb 2020 08:04:59 +0100 Subject: [PATCH] Kept antialiasing enabled only for the cursor rendering --- src/renderer/cursor_renderer/mod.rs | 4 ++-- src/renderer/mod.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/renderer/cursor_renderer/mod.rs b/src/renderer/cursor_renderer/mod.rs index 625108e..2367af6 100644 --- a/src/renderer/cursor_renderer/mod.rs +++ b/src/renderer/cursor_renderer/mod.rs @@ -230,10 +230,10 @@ impl CursorRenderer { pub fn draw(&mut self, cursor: Cursor, default_colors: &Colors, font_width: f32, font_height: f32, - paint: &mut Paint, shaper: &mut CachingShaper, - canvas: &mut Canvas) { + shaper: &mut CachingShaper, canvas: &mut Canvas) { let render = self.blink_status.update_status(&cursor); + let mut paint = Paint::new(skulpin::skia_safe::colors::WHITE, None); paint.set_anti_alias(true); self.previous_position = { diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index 6d5d414..6d38f1d 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -162,8 +162,7 @@ impl Renderer { self.cursor_renderer.draw( cursor, &default_style.colors, self.font_width, self.font_height, - &mut self.paint, &mut self.shaper, - gpu_canvas); + &mut self.shaper, gpu_canvas); font_changed }