Mathematical derivation of theoretical raw texture memory, device pixel ratio quadratic scaling, and Chromium's tiled buffer modeling.
For any rectangular DOM element promoted to an independent GPU compositor layer with CSS dimensions W (width in CSS pixels) and H (height in CSS pixels), operating on a display with Device Pixel Ratio DPR=δ, the theoretical raw texture-memory estimate Mraw is:
Mraw=W⋅H⋅4⋅δ2bytes
- Under W3C CSS Values and Units Module, 1 CSS pixel corresponds to δ physical device pixels along each axis:
Wphysical=W⋅δ,Hphysical=H⋅δ
- Total discrete physical pixels P:
P=Wphysical⋅Hphysical=(W⋅δ)⋅(H⋅δ)=W⋅H⋅δ2
- Under the standardized RGBA8888 bitmap allocation (
SkColorType::kRGBA_8888), each discrete pixel allocates 4 bytes (Red, Green, Blue, Alpha, 8 bits each):
Mraw=P⋅4 bytes=W⋅H⋅4⋅δ2■
Precision Boundary:
Mraw models the uncompressed pixel surface data. Total runtime GPU VRAM footprint additionally includes texture alignment boundaries, mipmap hierarchies, GPU driver allocation overhead, and surface swap chains.
The quadratic factor δ2 creates dramatic memory amplification across device tiers:
| Device Viewport | Dimensions (W×H) | DPR (δ) | Density Factor (δ2) | Raw Full-Screen Texture Estimate |
|---|
| Standard Desktop | 1440×900 | 1 | 1× | ≈5.18 MB |
| Retina Desktop | 1440×900 | 2 | 4× | ≈20.73 MB |
| Mobile Retina (iPhone) | 390×844 | 3 | 9× | ≈11.85 MB |
| High-Res Desktop 4K | 3840×2160 | 2 | 4× | ≈132.71 MB |
Mobile Implication (WebKit Unified Memory Pressure):
Mobile GPUs share unified system memory (RAM). When an iOS Safari or Chrome tab exceeds the operating system's strict memory budget, the kernel Jetsam process terminates the tab. A mobile page with 15–20 promoted layers can rapidly allocate >300MB of raw texture surfaces, inducing severe memory pressure.
In Chromium's Compositor architecture (//src/cc/tiles/tile_manager.cc and picture_layer_tiling_set.cc):
- Root scrolling layers cannot be allocated as a single monolithic texture due to GPU texture size limits (4096px or 8192px).
- Layers are divided into discrete tiles (256×256px or 512×512px).
- Pre-rasterization Horizon: To mitigate checkerboarding during fast fling-scrolling, Chromium pre-rasters margin buffers around the visible viewport.
Chromium's tiled compositor architecture divides scrollable raster layers into discrete 256×256px tiles (cc::TileManager::kDefaultTileSize). Tiled scrollers allocate memory for the visible display area plus a pre-paint raster lookahead horizon:
TilesX=⌈256Wviewport⋅δ⌉,TilesY=⌈256Hraster⋅δ⌉
Mtiled_buffer=Nscrollers⋅(TilesX⋅TilesY⋅2562⋅4)
This discrete tile pooling formulation is a theoretical tiled-backing estimate. It is not a complete physical VRAM measurement: tile size, raster policy, compression, driver allocation, swap chains, and memory pressure vary by browser version and device.