<p>On typical GPUs today it's option B: monitor rotation is done by the video output hardware ("display engine") during scan-out. In addition to rotating/flipping, the display engine can also scale the image within certain limits, do simple color/gamma correction, and even composite multiple image layers ("planes") together, all dynamically during scan-out.</p>

CC BY-SA 4.0
2018-05-22T20:52:00.797Z
2018-05-22T20:52:00.797Z
Nathan Reed
<p>When the display hardware is physically rotated 90 degrees, your graphics can still be rendered with the correct side up. Where is this rotation accomplished?
I can imagine a few possibilities:</p>

<p>A) The code for every low-level graphics primitive contains something to converts its arguments, like</p>

<pre><code>if (portrait) {
   swap(x,y);
}
</code></pre>

<p>(or perhaps multiplying every coordinate with a matrix)</p>

<p>B) The part of the graphics card that continuously scans its memory to create a video signal reads the data in a different order.</p>

<p>C) The monitor paints the received data column by column instead of row by row</p>

<p>A and B sounds like they would be inefficient and C means that it would only work on monitors that has special hardware-support for rotation.
Which one is it?</p>

<2d>
What part of the graphics chain rotates computer displays when in portrait mode?
Joakim Rosqvist
# What part of the graphics chain rotates computer displays when in portrait mode?

(Asked by: username_0 on 2018-05-22)

When the display hardware is physically rotated 90 degrees, your graphics can still be rendered with the correct side up. Where is this rotation accomplished?
I can imagine a few possibilities:

A) The code for every low-level graphics primitive contains something to converts its arguments, like

```
if (portrait) {
   swap(x,y);
}

```

(or perhaps multiplying every coordinate with a matrix)

B) The part of the graphics card that continuously scans its memory to create a video signal reads the data in a different order.

C) The monitor paints the received data column by column instead of row by row

A and B sounds like they would be inefficient and C means that it would only work on monitors that has special hardware-support for rotation.
Which one is it?

**Tags:** 2d


---

## 1 answers

### Answer by username_1 on 2018-05-22. Score: 2 | Accepted answer

On typical GPUs today it's option B: monitor rotation is done by the video output hardware ("display engine") during scan-out. In addition to rotating/flipping, the display engine can also scale the image within certain limits, do simple color/gamma correction, and even composite multiple image layers ("planes") together, all dynamically during scan-out.


---

