mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
add tracing
This commit is contained in:
@ -5,6 +5,7 @@ const std = @import("std");
|
|||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const harfbuzz = @import("harfbuzz");
|
const harfbuzz = @import("harfbuzz");
|
||||||
|
const trace = @import("tracy").trace;
|
||||||
const Atlas = @import("../Atlas.zig");
|
const Atlas = @import("../Atlas.zig");
|
||||||
const Face = @import("main.zig").Face;
|
const Face = @import("main.zig").Face;
|
||||||
const Group = @import("main.zig").Group;
|
const Group = @import("main.zig").Group;
|
||||||
@ -55,6 +56,9 @@ pub fn runIterator(self: *Shaper, row: terminal.Screen.Row) RunIterator {
|
|||||||
///
|
///
|
||||||
/// If there is not enough space in the cell buffer, an error is returned.
|
/// If there is not enough space in the cell buffer, an error is returned.
|
||||||
pub fn shape(self: *Shaper, run: TextRun) ![]Cell {
|
pub fn shape(self: *Shaper, run: TextRun) ![]Cell {
|
||||||
|
const tracy = trace(@src());
|
||||||
|
defer tracy.end();
|
||||||
|
|
||||||
// TODO: we do not want to hardcode these
|
// TODO: we do not want to hardcode these
|
||||||
const hb_feats = &[_]harfbuzz.Feature{
|
const hb_feats = &[_]harfbuzz.Feature{
|
||||||
harfbuzz.Feature.fromString("dlig").?,
|
harfbuzz.Feature.fromString("dlig").?,
|
||||||
@ -147,6 +151,9 @@ pub const RunIterator = struct {
|
|||||||
i: usize = 0,
|
i: usize = 0,
|
||||||
|
|
||||||
pub fn next(self: *RunIterator, alloc: Allocator) !?TextRun {
|
pub fn next(self: *RunIterator, alloc: Allocator) !?TextRun {
|
||||||
|
const tracy = trace(@src());
|
||||||
|
defer tracy.end();
|
||||||
|
|
||||||
// Trim the right side of a row that might be empty
|
// Trim the right side of a row that might be empty
|
||||||
const max: usize = max: {
|
const max: usize = max: {
|
||||||
var j: usize = self.row.lenCells();
|
var j: usize = self.row.lenCells();
|
||||||
|
Reference in New Issue
Block a user