summaryrefslogtreecommitdiff
path: root/crates/typst-render/src
diff options
context:
space:
mode:
authorSébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com>2023-12-30 13:36:15 +0100
committerGitHub <noreply@github.com>2023-12-30 12:36:15 +0000
commitc4d9b0c3d8d2cf895137d2047e597fd3e24e0104 (patch)
tree679241e556928726824262f65b41fcbcb2fbd4a3 /crates/typst-render/src
parent4e5afa672f502d53e931d432ec1a36bdc6e16583 (diff)
New performance timings (#3096)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'crates/typst-render/src')
-rw-r--r--crates/typst-render/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/typst-render/src/lib.rs b/crates/typst-render/src/lib.rs
index b906ac53..34e9b7b3 100644
--- a/crates/typst-render/src/lib.rs
+++ b/crates/typst-render/src/lib.rs
@@ -24,6 +24,7 @@ use usvg::{NodeExt, TreeParsing};
///
/// This renders the frame at the given number of pixels per point and returns
/// the resulting `tiny-skia` pixel buffer.
+#[typst_macros::time(name = "render")]
pub fn render(frame: &Frame, pixel_per_pt: f32, fill: Color) -> sk::Pixmap {
let size = frame.size();
let pxw = (pixel_per_pt * size.x.to_f32()).round().max(1.0) as u32;