# gpui: Disable rounding in the layout engine \(\#31836\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f738fbd4f8754ae83c720a5b3cb81e8dc3315ee5)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f738fbd4f8754ae83c720a5b3cb81e8dc3315ee5

Requested commit: f738fbd4f8754ae83c720a5b3cb81e8dc3315ee5

Commit: f738fbd4f8754ae83c720a5b3cb81e8dc3315ee5

Tree: a8710db7da77003b28f8e77762c619c7970a2d0f

Author: waffle

Committer: GitHub

## Message

```
gpui: Disable rounding in the layout engine (#31836)

Rounding broke (among other things, probably) pixel-perfect image
rendering with non-power-of-two scaling factor.

An example which reproduces the problem can be found
[here](https://github.com/WaffleLapkin/gpui_taffy_rounding_whyyyyy).

How it looks with `gpui` from `main`:
![2025-05-31
11:34:25+CEST](https://github.com/user-attachments/assets/2cb19312-6ba6-4e80-8072-f89ddedff77b)

How it looks with this patch:
![2025-05-31
11:35:28+CEST](https://github.com/user-attachments/assets/114b52a9-58c0-4600-871c-a20eceb7179e)

Both screenshots are made on kde+wayland with magnification using kde's
built-in magnification (`Meta`+`+`, `Meta`+`-`). Note that screenshot
apps have a high chance of lying 🙃

The image itself is 400 by 300 pixels of red/green checkerboard pattern
made specifically to exaggerate scaling issues.

Release Notes:

- N/A
```

## Parents

- [0c78a115debd35f43d748b42bfeaa5486252a835](https://git.cafe/gitcafe/zed/commit/0c78a115debd35f43d748b42bfeaa5486252a835?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f738fbd4f8754ae83c720a5b3cb81e8dc3315ee5?format=markdown)
