progressive rendering progress

macos-click-through
Keith Simmons 5 years ago
parent 0cc51481b2
commit 06eb849497

@ -32,7 +32,8 @@ pub struct Renderer {
impl Renderer {
pub fn new(editor: Arc<Mutex<Editor>>) -> Renderer {
let surface = None;
let paint = Paint::new(colors::WHITE, None);
let mut paint = Paint::new(colors::WHITE, None);
paint.set_anti_alias(false);
let typeface = Typeface::new(FONT_NAME, FontStyle::default()).expect("Could not load font file.");
let font = Font::from_typeface(typeface, FONT_SIZE);
let shaper = CachingShaper::new();

@ -1,5 +1,5 @@
use std::sync::{Arc, Mutex};
use skulpin::{CoordinateSystem, RendererBuilder};
use skulpin::{CoordinateSystem, RendererBuilder, PresentMode};
use skulpin::skia_safe::icu;
use skulpin::winit::dpi::LogicalSize;
use skulpin::winit::event::{ElementState, Event, MouseScrollDelta, WindowEvent};
@ -29,6 +29,7 @@ pub fn ui_loop(editor: Arc<Mutex<Editor>>, nvim: Neovim, initial_size: (u64, u64
let mut skulpin_renderer = RendererBuilder::new()
.coordinate_system(CoordinateSystem::Logical)
.present_mode_priority(vec![PresentMode::Immediate])
.build(&window)
.expect("Failed to create renderer");

Loading…
Cancel
Save