fix(webgl): Add ClearTarget and always rebuild in test script

1. gal_webgl_test.cpp: Add ClearTarget(TARGET_NONCACHED) before ClearScreen()
   - Matches native test harness behavior
   - Fixes accumulated content from previous scenarios
   - arc-segments now 10% different (was 86% due to content accumulation)

2. test-gal-regression.sh: Remove "skip if already built" check
   - Always rebuild to pick up code changes
   - Single script is the source of truth for full test cycle

Current results:
- 3 scenarios MATCH (<1%): basic-lines, arcs, transforms
- Many scenarios close (~10%): arc-segments, circles, hole-walls, etc.
- Some features not implemented (97-100%): glyphs, text-attrs, bitmap

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Viktor Vaczi 2026-01-08 11:37:41 +01:00
commit 92466d728c
2 changed files with 4 additions and 8 deletions

View file

@ -254,13 +254,6 @@ build_webgl() {
return 0
fi
# Check if we have the output already (built previously)
local output_dir="$PROJECT_ROOT/tests/apps/gal-webgl"
if [ -f "$output_dir/gal_webgl_test.js" ] && [ -f "$output_dir/gal_webgl_test.wasm" ]; then
log_step "WebGL test already built, skipping rebuild"
return 0
fi
# Check if Emscripten is available
if ! command -v emcmake &> /dev/null; then
log_step "Emscripten not available - WebGL build requires emsdk or Docker"