---
title: "GPU surfaces"
description: "Moving many positioned views with a camera is expensive on macOS. A GPU board and grid can bind their own tokens with surface=board(color(\"surface.board\"), color(\"board.dot\"))."
modificationDate: "2026-12-01"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# GPU surfaces

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/reference/pitfalls/gpu-surfaces: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

- **Moving many positioned views with a camera is expensive on macOS.** On an
  M5 Max, the counter-only scene averaged 4.61 million retired instructions per
  display-link step across two runs. Adding 100 stationary, absolutely positioned labels with `font-size=9`
  brought that to 6.35 million. Changing their `left` each step used 84.43 million.
  After subtracting the counter-only scene, each label averaged about
  17,000 instructions per step standing still and 798,000 moving.
  Moving an already mounted label cost about 781,000 extra instructions. The Apple
  host sends an unchanged paragraph before the label’s frame update. AppKit can
  also redraw an unclipped layer-backed view when only its origin changes.
  For plain columns with `width=20 height=20`, each averaged about 4,000 instructions
  per step standing, 220,000 moving with `left` and 210,000 moving with `translate`.
  For marks that follow a camera in bulk, draw
  them in a GPU surface or let the surface place each canvas child (`ChildrenMode::Each`).
  (macOS 27.0.1, #1762, [measurement procedure](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/docs/testing.md#measuring-to-optimize-tests), LLP 1014 D5.)
- A GPU board and grid can bind their own tokens with `surface=board(color("surface.board"), color("board.dot"))`. A transparent clear over a token-painted view also works for the board.

- **A record's named fields reach the wrong surface arguments.** Records cross
  into a GPU surface by position, not by field name. Import the package's
  shapes (`ModelNode` and `ModelHotspot` for `@exact/model-viewer`); if you
  declare a shorter shape, keep its fields in the package's declaration order.
  (Model viewer's record parsing tests, LLP 1133.039 D1.)
- **A model viewer stops a page scrolling over it.** A canvas that takes input
  owns every touch and wheel in its box. `cameraControls=true` reserves that
  input at mount; `disableZoom=true` does not return the wheel to the page.
  Leave controls unsaid for a passive model, or room beside an interactive
  one for scrolling. Changing mode needs another canvas mount, as in the
  [scrolling fixture](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/packages/model-viewer/test/fixture/scrolling.contract).
  (Model viewer scrolling drives, LLP 1133.039 D9.)
