CNA-GAP-027: HTML_DOM and SVG_DOM refuse back-buffer readback
Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
GetBackBufferData throws on these renderers because their back buffer is a live DOM subtree that no browser API rasterises; only bound render targets can be read.
- Identifier
CNA-GAP-027- Category
- Functional gap
- Subsystem
- Graphics & renderers
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- GraphicsDevice::GetBackBufferData on HTML_DOM and SVG_DOM
Expected behaviour
XNA HiDef supports GetBackBufferData.
Actual behaviour at TARGET
HtmlDomRenderer.cpp's ReadBackbuffer throws with the explanation that the back buffer "is a live DOM subtree composited by the browser, and no browser API rasterizes one to pixels", recommending a RenderTarget2D or the CANVAS renderer; SvgDomRenderer.cpp refuses likewise. The chapter package also noted a transparent-padding read for a region larger than a bound target; that path is reachable only by calling the renderer directly, because GraphicsDevice::GetBackBufferData refuses while a render target is bound.
Source locations
modules/renderers/html-dom/src/HtmlDomRenderer.cpp— HtmlDomRenderer::ReadBackbuffermodules/renderers/svg-dom/src/SvgDomRenderer.cpp— SvgDomRenderer::ReadBackbuffermodules/graphics/src/Xna/GraphicsDevice.cpp— GetBackBufferDataCore refuses while a render target is active
Evidence
Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry.
Independent re-verification: Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry. The refusals are pinned by native gtests, BackbufferReadbackThrowsWithAnActionableMessage in HtmlDomRendererTests.cpp and in SvgDomRendererTests.cpp (compiled when that renderer is the selected one); the htmldom-ci browser suite (smoke, pixel, stress, dispose pages) never calls GetBackBufferData, and no workflow is seen running the SVG_DOM tests.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
HTML_DOM refusal is covered by its browser harness; SVG_DOM runs only manually.
Regression test
None beyond the refusal tests.
Blast radius
Screenshot features and pixel-reading game logic on the DOM renderers.
Workaround
Render into a RenderTarget2D and read that, or use CANVAS.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Known issues
- Functional gap index