Does every pixel get multiplied by a rotation matrix?

Does every pixel get multiplied by a matrix regardless of the needed transform?

If so, where does this happen please?
Thanks.
Dave H.

Without context, it happens usually in the GPU. Images are transfered as textures and paths as vertex arrays.
The GPU has a matrix stack, so that there is only one operation necessary if possible.
Thanks to the parallel nature of the GPU that is not such a problem.

CoreGraphics as well as DirectDraw (IIRC) are an abstraction that use the GPU even without writing OpenGL or Metal commands.

JUCE itself does several steps in the CPU beforehand though, e.g. clipping.

1 Like

Thanks for the info, Dan. I was mainly just curious as to where this all happens in the code?

*edit I just read that DirectDraw has been deprecated for a few years now. And that it might be suffering under all the hardware architecture changes:-

https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/9a63ce12-166a-47cd-b20e-06466c9ed13f/why-is-directdraw-or-rather-unlock-so-slow-on-windows-10?forum=vcgeneral

Sorry, I am not a windows person. I thought DirectDraw would be the same family, but in fact it is Direct2D that is used. The naming is direct confusing.

Adding a matrix is done here e.g.:

Or drawing an image is done here and subsequently in the PIMPL class:

You see the actual drawing is done in the driver, which will implement it in software or on the GPU.

2 Likes