Repository navigation
Conversation
1a7e1a0 to
bf6626c
Compare
- Reuse cached layer geometry across visibility changes - Add selective layer-scene invalidation - Skip attribute reads and compute slow extents during geometry traversal - Cover cache reuse and update rendering documentation
bf6626c to
fb3ff5d
Compare
Preserve the reviewed flat scene storage and phase 7 regression fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve screen CPU/GPU buffers during alternate-size draws. Respect retry delays after failed context recovery. Add native control and renderer regressions and record local validation and performance results. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pmeems
left a comment
There was a problem hiding this comment.
Recommendation: Approve. Risk: Low for the reviewed rendering changes, with the untested configurations noted below. Final decision is with the human reviewer; this is a COMMENT review, not an approval.
Reviewed every phase 8 changed file against the plan and repository guidance after merging the latest phase 7 base in an isolated worktree. Resolved nine merge conflicts and preserved the base's corrected tests, addressing the compilation errors in the original CI run.
Local review found and fixed two additional defects: alternate-size draws discarded the screen staging allocation, and failed context recovery bypassed the initialization retry delay. Three new regression cases failed before these fixes and now pass. Added control regressions for whole-pixel versus fractional/full-frame pan draws, oversized offsets, retained buffer sizes, and a real pending-fit resize failure with cache invalidation and a host redraw notification. Test access does not add COM interfaces or change instance layout.
Validation: CMake Debug and Release x64 each passed 425 non-interactive cases with zero failures and three opt-in skips. MSBuild Debug x64 built with zero warnings; all three native suites passed. Build configuration checks and compiler-flag/warning parity passed with zero lost options. Both opt-in Release renderer baselines passed; their timings are in the PR description and do not show a consistent speedup.
No remaining blocking findings. Outstanding findings by severity: Critical 0, Major 0, Minor 0, Suggestion 0. Existing-comment duplicates skipped: 0; no existing review or issue comments required resolution. Safe scene-support caching remains an explicit plan deviation because public scenes are mutable without generation tokens; a pointer-only cache would risk stale validation. GDI retains its safety preflight.
Limitations: no local Win32, full-driver Release, network, or interactive registration/hosting validation. Existing CMake command-line warning D9025 is unchanged. The source review HTML was unavailable. Remote CI must validate this new head.
There was a problem hiding this comment.
🟡 Changes recommended
Non-retaining draws discard initialization-failure retry state, causing OpenGL initialization to retry every frame instead of honoring the 60-draw backoff.
1 open issue
What changed in this PR
This PR hardens ActiveX rendering on top of #79’s per-layer scene caching. It addresses cached-pan edge cases, protects screen resources during alternate-size draws, and improves OpenGL recovery.
Changes:
- Validate cached pan offsets before integer conversion and invalidate caches with host notification after resize failures.
- Isolate alternate-size rendering resources, reuse transformed vertex storage, read pixels directly in BGRA format, and delay failed OpenGL initialization retries.
- Add control and renderer regressions, update build file lists, and document behavior and validation.
Builds and tests were not run during this review; the PR reports successful local Windows validation.
| File | Description |
|---|---|
tests/MapWinGIS.ActiveX.Tests/VectorLayerRendererTests.cpp |
Adds pan validation, staging preservation, and recovery regressions. |
tests/MapWinGIS.ActiveX.Tests/OpenGlVectorLayerRendererTestAccess.h |
Exposes staging and retry state for tests. |
tests/MapWinGIS.ActiveX.Tests/MapWinGISControlTestAccess.h |
Adds test-only control state access. |
tests/MapWinGIS.ActiveX.Tests/MapWinGIS.ActiveX.Tests.vcxproj |
Registers new test headers for MSBuild. |
tests/MapWinGIS.ActiveX.Tests/CMakeLists.txt |
Registers new test headers for CMake. |
tests/MapWinGIS.ActiveX.Tests/ActiveXActivationTests.cpp |
Tests scaled draws, cached pans, and resize-failure notification. |
src/MapWinGIS.ActiveX/VectorRenderBackend.h |
Defines the temporary-resource draw option. |
src/MapWinGIS.ActiveX/VectorLayerRenderer.h |
Extends the coordinator’s draw interface. |
src/MapWinGIS.ActiveX/VectorLayerRenderer.cpp |
Forwards resource-retention settings to OpenGL. |
src/MapWinGIS.ActiveX/PanBlit.h |
Adds bounded whole-pixel shift validation. |
src/MapWinGIS.ActiveX/OpenGlVectorLayerRenderer.h |
Declares staging and initialization-retry state. |
src/MapWinGIS.ActiveX/OpenGlVectorLayerRenderer.cpp |
Implements temporary rendering, BGRA readback, vertex reuse, and backoff. |
src/MapWinGIS.ActiveX/MapWinGISControl.h |
Adds test access and resource-retention plumbing. |
src/MapWinGIS.ActiveX/MapWinGISControl.cpp |
Hardens resize handling, cached pans, and alternate-size draws. |
src/MapWinGIS.ActiveX/MapWinGIS.ActiveX.vcxproj |
Registers the pan helper for MSBuild. |
src/MapWinGIS.ActiveX/GdiVectorLayerRenderer.h |
Aligns GDI with the extended backend interface. |
src/MapWinGIS.ActiveX/GdiVectorLayerRenderer.cpp |
Accepts the unused resource-retention parameter. |
src/MapWinGIS.ActiveX/GdalEventSource.h |
Replaces module-header coupling with direct ATL includes. |
src/MapWinGIS.ActiveX/CMakeLists.txt |
Registers the pan helper for CMake. |
README.md |
Summarizes cached-pan and temporary-buffer behavior. |
docs/TESTING.md |
Documents new control and renderer coverage. |
docs/ARCHITECTURE.md |
Explains resource isolation, readback, and recovery behavior. |
.github/plans/development-review-fix-plan-20261113.md |
Records phase 8 results, measurements, and limitations. |
.ai/memory/architecture/activex.md |
Records rendering resource and recovery constraints. |
Review effort: Balanced
- Carry initialization retry bookkeeping across temporary renderer instances. - Cover repeated non-retaining draws after initialization failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Summary
Implements phase 8 of
.github/plans/development-review-fix-plan-20261113.md, stacked on #79.phase-7-per-layer-render-scenesbase and resolved nine conflicts. Preserved its reviewed flat polygon storage and test fixes, which address the original CI compilation failures.Local review and validation
The branch was checked out in
.worktrees\pr-81. Two additional defects were found and fixed: scaled draws discarded the existing screen staging allocation, and failed context recovery bypassed the retry delay. Three regression cases failed before those fixes and now pass.The regressions cover whole-pixel cached drags, fractional and full-frame fallbacks, offsets beyond LONG range, real pending-fit resize failure and host redraw notification, scaled-buffer preservation, odd-height BGRA output, and initialization retries after a delay or resize. No existing review comments required resolution.
Existing CMake command-line warning D9025 about
/external:W0and/external:W4remains unchanged; there were no new source warnings.Release measurements
Sequential runs compared phase 7
a3ea595with this implementation at 1280x720.This run does not show a consistent speedup. Timings are observations, not test thresholds.
Limitations
The current renderer has no separate convexity/angle calculation. Public scenes are mutable and have no reliable generation token for caching support results, so support checks remain uncached. A pointer-only cache can return stale results. GDI retains its coordinate preflight to avoid partially drawing invalid layers.
Local builds reused existing default-driver packages without reinstalling shared dependencies. Win32, the full-driver Release feature set, network tests, and interactive registration/hosting checks were not run. The source review HTML was unavailable at the referenced D: and equivalent F: paths.
The updated head requires fresh remote CI. The PR remains open and its stack membership and base are unchanged.