fix: switch to a shared GraphemeCache and increase it's size to 512kb
This commit is contained in:
parent
4aecc983c0
commit
b6b1f02565
4 changed files with 32 additions and 13 deletions
|
|
@ -2,6 +2,7 @@ const std = @import("std");
|
|||
const vaxis = @import("vaxis");
|
||||
|
||||
pub const Plane = @import("Plane.zig");
|
||||
const GraphemeCache = @import("GraphemeCache.zig");
|
||||
|
||||
const Layer = @This();
|
||||
|
||||
|
|
@ -9,6 +10,7 @@ view: View,
|
|||
y_off: i32 = 0,
|
||||
x_off: i32 = 0,
|
||||
plane_: Plane,
|
||||
cache_storage: GraphemeCache.Storage = .{},
|
||||
|
||||
const View = struct {
|
||||
allocator: std.mem.Allocator,
|
||||
|
|
@ -57,6 +59,7 @@ pub fn init(allocator: std.mem.Allocator, opts: Options) std.mem.Allocator.Error
|
|||
const name = "layer";
|
||||
self.plane_ = .{
|
||||
.window = self.window(),
|
||||
.cache = self.cache_storage.cache(),
|
||||
.name_buf = undefined,
|
||||
.name_len = name.len,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue