diff --git a/src/renderer/atlas/README.md b/src/renderer/atlas/README.md index c72e77f51e..a1619e9b4b 100644 --- a/src/renderer/atlas/README.md +++ b/src/renderer/atlas/README.md @@ -4,18 +4,18 @@ ```mermaid graph TD - RenderThread["RenderThread (base/thread.cpp)\ncalls Renderer::PaintFrame() x times per sec"] - Renderer["Renderer (base/renderer.cpp)\nbreaks the text buffer down into GDI-oriented graphics\nprimitives (#quot;change brush to color X#quot;, #quot;draw string Y#quot;, ...)"] - RenderEngineBase[/"RenderEngineBase\n(base/RenderEngineBase.cpp)\nabstracts 24 LOC 👻"\] + RenderThread["RenderThread (base/thread.cpp)
calls Renderer::PaintFrame() x times per sec"] + Renderer["Renderer (base/renderer.cpp)
breaks the text buffer down into GDI-oriented graphics
primitives (#quot;change brush to color X#quot;, #quot;draw string Y#quot;, ...)
"] + RenderEngineBase[/"RenderEngineBase
(base/RenderEngineBase.cpp)
abstracts 24 LOC 👻"\] GdiEngine["GdiEngine (gdi/...)"] subgraph AtlasEngine["AtlasEngine (atlas/...)"] - AtlasEngine.cpp["AtlasEngine.cpp\nImplements IRenderEngine text rendering API\nbreaks GDI graphics primitives down into DWRITE_GLYPH_RUNs"] - AtlasEngine.api.cpp["AtlasEngine.api.cpp\nImplements the parts run inside the console\nlock (many IRenderEngine setters)"] - AtlasEngine.r.cpp["AtlasEngine.r.cpp\nImplements the parts run\noutside of the console lock"] - Backend.cpp["Backend.cpp\nImplements common functionality/helpers"] - BackendD2D.cpp["BackendD2D.cpp\nPure Direct2D text renderer (for low latency\nremote desktop and older/no GPUs)"] - BackendD3D.cpp["BackendD3D.cpp\nCustom, performant text renderer\nwith our own glyph cache"] + AtlasEngine.cpp["AtlasEngine.cpp
Implements IRenderEngine text rendering API
breaks GDI graphics primitives down into DWRITE_GLYPH_RUNs
"] + AtlasEngine.api.cpp["AtlasEngine.api.cpp
Implements the parts run inside the console
lock (many IRenderEngine setters)"] + AtlasEngine.r.cpp["AtlasEngine.r.cpp
Implements the parts run
outside of the console lock"] + Backend.cpp["Backend.cpp
Implements common functionality/helpers"] + BackendD2D.cpp["BackendD2D.cpp
Pure Direct2D text renderer (for low latency
remote desktop and older/no GPUs)
"] + BackendD3D.cpp["BackendD3D.cpp
Custom, performant text renderer
with our own glyph cache
"] end RenderThread --> Renderer @@ -63,8 +63,8 @@ graph TD ```mermaid graph TD - Render --> _drawCursorPart1["_drawCursorPart1\nruns before _drawText\ndraws cursors that are behind the text"] - Render --> _drawCursorPart2["_drawCursorPart2\nruns after _drawText\ndraws inverted cursors"] + Render --> _drawCursorPart1["_drawCursorPart1
runs before _drawText
draws cursors that are behind the text"] + Render --> _drawCursorPart2["_drawCursorPart2
runs after _drawText
draws inverted cursors"] _drawCursorPart1 -.->|_cursorRects| _drawCursorPart2 ``` @@ -81,26 +81,26 @@ graph TD foreachFont --> foreachGlyph(("for each glyph")) foreachGlyph --> foreachGlyph - foreachGlyph --> _glyphAtlasMap[("font/glyph-pair lookup in\nglyph cache hashmap")] + foreachGlyph --> _glyphAtlasMap[("font/glyph-pair lookup in
glyph cache hashmap")] _glyphAtlasMap --> drawGlyph - drawGlyph --> _appendQuad["_appendQuad\nstages the glyph for later drawing"] + drawGlyph --> _appendQuad["_appendQuad
stages the glyph for later drawing"] _glyphAtlasMap --> _appendQuad subgraph drawGlyph["if glyph is missing"] - _drawGlyph["_drawGlyph\n(defers to _drawSoftFontGlyph for soft fonts)"] + _drawGlyph["_drawGlyph
(defers to _drawSoftFontGlyph for soft fonts)"] _drawGlyph -.->|if glpyh cache is full| _drawGlyphPrepareRetry - _drawGlyphPrepareRetry --> _flushQuads["_flushQuads\ndraws the current state\ninto the render target"] - _flushQuads --> _recreateInstanceBuffers["_recreateInstanceBuffers\nallocates a GPU buffer\nfor our glyph instances"] - _drawGlyphPrepareRetry --> _resetGlyphAtlas["_resetGlyphAtlas\nclears the glyph texture"] - _resetGlyphAtlas --> _resizeGlyphAtlas["_resizeGlyphAtlas\nresizes the glyph texture if it's still small"] + _drawGlyphPrepareRetry --> _flushQuads["_flushQuads
draws the current state
into the render target
"] + _flushQuads --> _recreateInstanceBuffers["_recreateInstanceBuffers
allocates a GPU buffer
for our glyph instances
"] + _drawGlyphPrepareRetry --> _resetGlyphAtlas["_resetGlyphAtlas
clears the glyph texture"] + _resetGlyphAtlas --> _resizeGlyphAtlas["_resizeGlyphAtlas
resizes the glyph texture if it's still small"] - _drawGlyph -.->|if it's a DECDHL glyph| _splitDoubleHeightGlyph["_splitDoubleHeightGlyph\nDECDHL glyphs are split up into their\ntop/bottom halves to emulate clip rects"] + _drawGlyph -.->|if it's a DECDHL glyph| _splitDoubleHeightGlyph["_splitDoubleHeightGlyph
DECDHL glyphs are split up into their
top/bottom halves to emulate clip rects
"] end - foreachGlyph -.-> _drawTextOverlapSplit["_drawTextOverlapSplit\nsplits overly wide glyphs up into smaller chunks to support\nforeground color changes within the ligature"] + foreachGlyph -.-> _drawTextOverlapSplit["_drawTextOverlapSplit
splits overly wide glyphs up into smaller chunks to support
foreground color changes within the ligature
"] - foreachRow -.->|if gridlines exist| _drawGridlineRow["_drawGridlineRow\ndraws underlines, etc."] + foreachRow -.->|if gridlines exist| _drawGridlineRow["_drawGridlineRow
draws underlines, etc."] ``` ### `_drawSelection`