01The question
A web page puts things on screen in two ways. Most of it is HTML and CSS: headings, links and images, laid out in boxes. Some of it can be a : a rectangle where code paints, such as a shader drifting behind a portfolio's heading, drawn with .
A post from a design tool mixes the two. Its canvas shows "~7,000 real HTML/CSS frames", two million elements in all, at 120 frames a second, and it calls what does it "a mini browser, in Rust, running inside your browser". With only those two ideas in hand the post makes no sense: HTML is one thing, a canvas is another. What joins them is underneath both, and once it is in place the rest stacks on it.
02Everything on screen is pixels
A pixel is one dot of colour, and everything on a screen is made of them: not only the shader, but the heading, the links and the photographs. All of it ends up as colours in the , and the fills it in. What differs is who decides what colour each pixel should be.
- In a shader, you decide. Your code tells the GPU what colour to make each pixel. There is nothing to arrange first: you aren't saying "put a heading here", you're saying "make this pixel this colour".
- In HTML and CSS, you describe. "A heading, this font, 48 px, centred, 24 px of space under it." A description isn't pixels. Something has to turn it into them, and that something is the browser.
Every path ends in pixels on the GPU. The difference is whether the browser decides them or your code does.
03The browser plans and paints the rest
Turning a description into pixels is two jobs, and Chrome has a part for each; together they are its . Blink is the planner. It reads the HTML and CSS, works out where everything goes and how big it is ("the heading is 640 px wide and starts 120 px from the top"), and writes down what to draw. Skia is the painter. It turns that list into pixels, on the GPU. Safari's engine, WebKit, has parts that do the same.
The planner keeps every element as a live object in the : something a script can change at any moment, a screen reader can read, a person can select. That is what makes a page easy to build, since you only describe and the browser does the rest. It is also what each element costs, in memory and in planning time. A few thousand elements is an ordinary page. Two million is more than Blink is built to keep moving at 120 frames a second.
A canvas is the way round it. It is one element, <canvas>, a blank rectangle. Blink places the rectangle and stops there: what goes inside is left to your code. When you set one up you say how you'll paint into it: with a simple 2D API, with WebGL, or with . Chrome then puts what you painted into its place in the page with everything else, and the finished frame goes to the screen.
HTML is a description the browser turns into pixels. A canvas is a hole in the description, where your code paints.
04A canvas is painted through a graphics API
Your code doesn't hand the GPU pixels either. It goes through a : a set of functions the system gives you, the way localStorage and fetch are functions the browser gives you. The API is a contract ("here is a shape, here is a texture, use this shader, now draw"). Behind it, the driver, written by whoever made the chip, turns those calls into commands that chip understands.
Drawing one triangle takes three calls in any of them: copy its three corners into the GPU's memory, pick the shader, draw. In WebGL the last is gl.drawArrays. A frame of a game is thousands of these , about 30 or 60 times a second, and they are collected into a list and sent to the GPU in batches.
The isn't part of the API. It is a small program in a language of its own, GLSL for WebGL, and your JavaScript carries it as a string, the way fetch carries a JSON body without reading it. WebGL has it compiled for the GPU, which then runs it once for every corner of a shape, or once for every pixel.
WebGL is the delivery: functions your JavaScript calls on the CPU. The shader is the parcel: a program that runs on the GPU.
05Every machine has its own API, and the browser translates
Each platform has its own graphics API, mostly for reasons of history and politics: Metal on Apple's devices, DirectX on Windows and Xbox, Vulkan on Linux and Android, NVN on Nintendo's Switch. Each has its own shader language too: MSL for Metal, HLSL for DirectX.
A website can't call Metal: it would only work on a Mac, and a page reaching straight for the GPU would be a security risk. So the browser offers one API that is the same everywhere, and translates it into the machine's own as the page runs. In Chrome, a translator called ANGLE turns WebGL calls into Metal calls on a Mac and DirectX calls on Windows, and rewrites the GLSL into MSL or HLSL. Your page's code never changes.
On a Mac both translators write Metal, Apple's API, and both shaders are rewritten into MSL, Metal's shader language.
WebGL is the older of the browser's two. It copies OpenGL, a cross-platform API from 1992, by way of OpenGL ES, its cut-down version for phones. WebGPU is its replacement: in Chrome since 2023, in every major browser by 2026. It copies the modern APIs (Metal, Vulkan, DirectX 12), has its own shader language (WGSL) and its own translator in Chrome (Dawn). What matters here is the cost of each draw. WebGL checks and sets things up again on every call; WebGPU has you prepare once and send whole batches, which is how GPUs work now, so far more can be drawn in each frame. It can also use the GPU for sums that aren't drawing at all.
Translation costs a moment, once. A shader has to be rewritten and compiled for the chip before it can run, which is why a shader-heavy page can take a beat before its first frame, and why some PC games show "compiling shaders" when they start. After that, the compiled version is reused.
Your page speaks one API. On each machine the browser translates it into that machine's own.
06A browser inside the browser
Now the post reads plainly. The tool's canvas shows thousands of app screens at once, and each is a real app made of HTML and CSS: content that normally goes down the browser's path. Left to Chrome, Blink would have to plan 7,000 pages and two million elements, and plan them again at every zoom, scroll and click.
So they kept the content and replaced the planner and the painter. Their own, written in Rust, reads the HTML and CSS and works out the layout as Blink would, then paints the result through WebGPU into one canvas, the way a shader does. As far as Chrome can tell, the page is mostly one canvas, and Chrome only shows its pixels. "A mini browser inside your browser" is meant literally: planning and painting HTML is most of what a browser does.
Rust doesn't run in a page by itself. It is compiled to , a second kind of code browsers run besides JavaScript, at close to the machine's own speed. The engine does the working out on the CPU and hands batches of draw calls to WebGPU for the GPU.
Their engine can be faster than Chrome's because it does less. Chrome's planner keeps every element live, ready to be changed, read aloud or selected; theirs does only what a design canvas needs. It can skip what is off-screen or too small to see when zoomed out, and paint what is left in one batch, which is the cost WebGPU keeps low.
Figma made the same trade years ago: a C++ engine compiled to WebAssembly paints its whole canvas, through WebGL and now WebGPU. The difference is what is painted. A Figma frame is Figma's own drawing, so getting from a design to code is a translation. This tool's frames are your app's own HTML and CSS, so the design is the code, and its engine has to match Chrome's for every CSS property, which Chrome's teams have worked at for well over a decade. Expect gaps a demo doesn't show.
The same move works outside a browser. Raea, a tool for making video from code, pairs a small HTML and CSS renderer with a game engine, both drawing through a Rust library that implements WebGPU, so a page's captions and a 3D scene land in one frame on the GPU, ready for the video encoder.
They took content made for the browser's path and gave it a planner and painter of their own, painting into a canvas the way a shader does.
Connected
- Note · same thingRunning a program means pointing a core at numbers
The GPU and the framebuffer, there at the end of a program's run as the chip of many simple cores and the memory the screen is read from. Here, who decides what goes into it.
- Note · same thingBun is one file that does every job
Its browsers thread splits a browser into the engine that runs JavaScript and the part that draws the page. This note opens that drawing part: Blink plans, Skia paints.
- Note · same patternYour code runs inside a program you didn't write
Translation, there from source code into what a chip runs, here from one graphics API into each machine's own: ship one portable version, convert it where it lands. WebAssembly turns up in both.
- Note · same thingA browser extension is split between the page and the browser
Blink holding the DOM, there as what an extension's content script changes. Here, what each of those live elements costs.
Side threads
Questions that came up once the main idea began to hold, kept as they were asked. Each opens beside the paragraph it grew from.
Terms
Checked
What the chat had wrong or only half right, against sources. The note above already says the corrected thing.
- Blink is the planner and Skia the painter.Blink also writes the list of what to draw (Chrome's paint step); Skia turns the list into pixels in Chrome's GPU process (raster). Planner and painter is the right split, with the list made on the planner's side.Chrome for Developers, RenderingNG architecture
- Firefox 145 brought WebGPU to macOS in November 2025.Only to Apple Silicon Macs on macOS Tahoe. Firefox 147, in January 2026, brought it to Apple Silicon on every supported macOS; Intel Macs were still waiting.Mozilla Bugzilla, bug 1992212
- OpenGL, from 1992, isn't owned by one company: Khronos runs it.Silicon Graphics released it in 1992, and an industry board steered it until Khronos took it over in 2006.Khronos Group, OpenGL
- Blitz is the Blink part of a browser on its own: it reads HTML and CSS and works out layout.It has a painter too, drawing through Vello on wgpu, and its CSS is read by Stylo, Firefox's style engine. It is a small renderer, planner and painter, without the rest of a browser.DioxusLabs/blitz, README