-
Notifications
You must be signed in to change notification settings - Fork 278
Coordinate Systems
Dzmitry Malyshau edited this page Dec 14, 2016
·
1 revision
The general rule of thumb is that coordinates used in display lists, clips, viewports, transforms and stacking contexts are always:
- CSS / Logical pixels.
- In the local (untransformed) coordinate space of the owning stacking context.
- Assume that the scroll offset is zero.
The coordinates used in stacking contexts and display lists are logical units, the same as CSS pixels. They are the same value regardless of the dpi scaling ratio. The DPI scaling ratio is applied on the GPU as required.
When scrolling occurs, none of the coordinates in the display lists change. Scrolling is handled internally by tweaking matrices that get sent to the GPU in order to transform the display items.
There are a small number of APIs (primarily ones that interact with events such as scroll and mouse clicks etc) that use device pixels (including any hi-dpi scale factor).