diff options
author | bptato <nincsnevem662@gmail.com> | 2023-10-28 00:15:18 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-10-28 00:15:18 +0200 |
commit | f1e85a49a3ef4aaad28f8d4ac677def8732ebe58 (patch) | |
tree | f183b7aaf3bf3253f1ccb4a8a51bf558f55784f5 /src/render/renderdocument.nim | |
parent | 6efa186973b01cfaea0e3f6a5bbfca1a2cdd7f66 (diff) | |
download | chawan-f1e85a49a3ef4aaad28f8d4ac677def8732ebe58.tar.gz |
buffer: remove viewport reference
Viewport at this point is basically just the layout state, so it makes no sense to store it in buffer.
Diffstat (limited to 'src/render/renderdocument.nim')
-rw-r--r-- | src/render/renderdocument.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render/renderdocument.nim b/src/render/renderdocument.nim index 319d0f08..27435633 100644 --- a/src/render/renderdocument.nim +++ b/src/render/renderdocument.nim @@ -370,10 +370,10 @@ proc renderBlockBox(grid: var FlexibleGrid, box: BlockBox, x, y: LayoutUnit, for i in countdown(box.nested.high, 0): stack.add((box.nested[i], x, y, posx, posy)) -proc renderDocument*(styledRoot: StyledNode, viewport: Viewport, - attrs: WindowAttributes): FlexibleGrid = +proc renderDocument*(styledRoot: StyledNode, attrs: WindowAttributes): + FlexibleGrid = var grid: FlexibleGrid - let rootBox = viewport.renderLayout(styledRoot) + let rootBox = renderLayout(styledRoot, attrs) grid.renderBlockBox(rootBox, 0, 0, attrs) if grid.len == 0: grid.addLine() |