fix(linux): move atlas_renderer to yaze_gfx_core to resolve circular dependency

The previous fix added yaze_gfx_render to yaze_gfx_debug dependencies,
but this created a circular dependency because yaze_gfx_core depends on
both yaze_gfx_render and yaze_gfx_debug.

Root cause analysis:
- AtlasRenderer (in gfx_render) depends on Bitmap (gfx_core) and PerformanceProfiler (gfx_debug)
- PerformanceDashboard (in gfx_debug) calls AtlasRenderer::Get()
- This created a circular dependency: render -> core -> debug -> render

Solution: Move atlas_renderer.cc from GFX_RENDER_SRC to GFX_CORE_SRC
- atlas_renderer now lives in layer 4 (core) where it can access both debug and render
- Eliminates circular dependency while preserving functionality

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
scawful
2025-11-20 02:19:12 -05:00
parent cbdc6670a1
commit 0812a84a22

View File

@@ -66,6 +66,7 @@ set(GFX_RESOURCE_SRC
# build_cleaner:auto-maintain # build_cleaner:auto-maintain
set(GFX_CORE_SRC set(GFX_CORE_SRC
app/gfx/core/bitmap.cc app/gfx/core/bitmap.cc
app/gfx/render/atlas_renderer.cc
app/gfx/render/background_buffer.cc app/gfx/render/background_buffer.cc
app/gfx/resource/arena.cc app/gfx/resource/arena.cc
) )
@@ -80,7 +81,6 @@ set(GFX_UTIL_SRC
# build_cleaner:auto-maintain # build_cleaner:auto-maintain
set(GFX_RENDER_SRC set(GFX_RENDER_SRC
app/gfx/render/atlas_renderer.cc
app/gfx/render/texture_atlas.cc app/gfx/render/texture_atlas.cc
app/gfx/render/tilemap.cc app/gfx/render/tilemap.cc
) )
@@ -125,13 +125,12 @@ target_link_libraries(yaze_gfx_render PUBLIC
${YAZE_SDL2_TARGETS} ${YAZE_SDL2_TARGETS}
) )
# Layer 3c: Debug tools (depends on types, render, and resource) # Layer 3c: Debug tools (depends on types and resource)
add_library(yaze_gfx_debug STATIC ${GFX_DEBUG_SRC}) add_library(yaze_gfx_debug STATIC ${GFX_DEBUG_SRC})
configure_gfx_library(yaze_gfx_debug) configure_gfx_library(yaze_gfx_debug)
target_link_libraries(yaze_gfx_debug PUBLIC target_link_libraries(yaze_gfx_debug PUBLIC
yaze_gfx_types yaze_gfx_types
yaze_gfx_resource yaze_gfx_resource
yaze_gfx_render
ImGui ImGui
${YAZE_SDL2_TARGETS} ${YAZE_SDL2_TARGETS}
) )