[M1] Surface ignores get_surface_render_dims failure -> bogus dimensions #22
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
indigocode/igasset-viewer-react#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
File:
wasm/src/surface.cc:34-42(constructor) and48-62(Render)get_surface_render_dimsreturnsbool, but the return value is discarded:On failure
width/heightstay-1, andstatic_cast<uint32_t>(-1)= 4294967295 is fed intowgpu::SurfaceConfiguration.Impact: an invalid/huge surface configuration on any frame where dimension lookup fails (e.g. canvas momentarily detached).
Fix: check the boolean and bail / keep last-known-good dimensions.
Minor (same file): the constructor reads from the parameter
surface_proc_table(line 35) whileRenderreads from the membersurface_proc_table_— harmless but inconsistent.Filed by an automated AI code review (manual proof-of-concept run). Code locations reference the
various-cleanupbranch.