summaryrefslogtreecommitdiff
path: root/tests/test_runner.c
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-07-13 09:04:46 +0300
committerPaul Buetow <paul@buetow.org>2026-07-13 09:04:46 +0300
commit48aa1b3cdbf27be2e016e8b532687226f9249043 (patch)
tree89d3ceab9194d755aeb3219dda5c84cbfe8370f1 /tests/test_runner.c
parent89727590e718d3628a0847689182e896df646b8a (diff)
responsive: async loader, texture cache LRU, prefetch, tests (it0)
M3 (task it0): responsive + prefetch. - src/loader/loader.{c,h}: loader_load_async/_finish wrap the sync loader_load in a GTask worker; the task's source object is the GFile so the finish callback can check it against navigator.current (last-write-wins). - src/texturecache.{c,h}: bounded LRU (cap 4) of GFile->GdkTexture, hash+GQueue O(1) get/put, entry owns the key (no double-unref), evicts LRU on overflow. - src/window.c: async visible load (cancel-then-recreate single GCancellable); cache hit -> show+prefetch, miss -> async load; last-write-wins guard (g_file_equal(current, loaded)) before showing; prefetch next/prev into the cache via a separate prefetch cancellable (cancelled each round). Finish callbacks hold a ref on the window (released in the callback) so they never deref a freed window; dispose cancels both cancellables. - tests: unit test_texturecache (LRU evict/order/replace/miss), integration test_responsive_nav (10 rapid next -> last-write-wins). M1/M2 tests updated to pump the main loop (loads are now async) + drain_main before exit. - meson: texturecache in libggae; GIO_USE_VFS=local in fixtures_env. Fixed: texturecache double-unref (key ownership), async-callback UAF (window ref in callback data + drain in tests), a test g_build_filename leak. Sub-agent review issues addressed (dispose + cache-hit cancel in-flight loads).
Diffstat (limited to 'tests/test_runner.c')
0 files changed, 0 insertions, 0 deletions