Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
enable partial rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Enter-tainer committed Aug 19, 2023
1 parent 2416d75 commit 6319cc3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ mod actor;
mod args;
use clap::Parser;

use futures::SinkExt;
use hyper::http::Error;
use hyper::service::{make_service_fn, service_fn};
use log::{error, info};

use serde::{Deserialize, Serialize};
use tokio_tungstenite::tungstenite::Message;
use std::collections::HashMap;

use typst::geom::Point;
Expand Down Expand Up @@ -135,7 +137,7 @@ async fn main() {
let arguments = CliArguments::parse();
info!("Arguments: {:#?}", arguments);
let command = CompileSettings::with_arguments(arguments.clone());
let _enable_partial_rendering = arguments.enable_partial_rendering;
let enable_partial_rendering = arguments.enable_partial_rendering;
let entry = if command.input.is_absolute() {
command.input.clone()
} else {
Expand Down Expand Up @@ -213,7 +215,12 @@ async fn main() {
let src_to_doc_rx = src_to_doc_jump.0.subscribe();
let world_tx = world_tx.clone();
let doc_watch_rx = doc_watch_rx.clone();
let conn = accept_connection(stream).await;
let mut conn = accept_connection(stream).await;
if enable_partial_rendering {
conn.send(Message::Binary("partial-rendering,true".into()))
.await
.unwrap();
}
let actor::webview::Channels { svg, render_full } =
actor::webview::WebviewActor::set_up_channels();
let render_tx = render_full.0.clone();
Expand Down

0 comments on commit 6319cc3

Please sign in to comment.