renderer: use a DerivedConfig to avoid the main Config pointer

This commit is contained in:
Mitchell Hashimoto
2023-03-16 16:03:44 -07:00
parent b26e51d222
commit f34da17a11
4 changed files with 129 additions and 76 deletions

View File

@@ -5,10 +5,8 @@ const font = @import("../font/main.zig");
const renderer = @import("../renderer.zig");
const Config = @import("../config.zig").Config;
/// The app configuration. This must NOT be stored by any termio implementation.
/// The memory it points to is NOT stable after the init call so any values
/// in here must be copied.
config: *const Config,
/// The derived configuration for this renderer implementation.
config: renderer.Renderer.DerivedConfig,
/// The font group that should be used.
font_group: *font.GroupCache,