Re: Hardware-accelerated scaling on iOS without OpenGL

2016-11-25 Thread David Duncan
The transform is a reasonable way to go. You can also change the contentMode to get scaling for free. Fundamentally this all ends up as a texture draw on the GPU so how you get the geometry for the draw there is nearly irrelevant. The major performance gain from OpenGL (or Metal) in this case

Re: Hardware-accelerated scaling on iOS without OpenGL

2016-11-25 Thread Alex Zavatone
On Nov 25, 2016, at 10:38 AM, Andreas Falkenhahn wrote: > On 25.11.2016 at 16:29 David Duncan wrote: > >> The fastest method without OpenGL is to work with CGImage directly >> and assign the image as the contents of a CALayer. > >> This will engage CoreAnimation to use the hardware to scale

Re: Hardware-accelerated scaling on iOS without OpenGL

2016-11-25 Thread Andreas Falkenhahn
On 25.11.2016 at 16:29 David Duncan wrote: > The fastest method without OpenGL is to work with CGImage directly > and assign the image as the contents of a CALayer. > This will engage CoreAnimation to use the hardware to scale the > image, but is still not quite as fast as OpenGL for the same

Re: Hardware-accelerated scaling on iOS without OpenGL

2016-11-25 Thread David Duncan
The fastest method without OpenGL is to work with CGImage directly and assign the image as the contents of a CALayer. This will engage CoreAnimation to use the hardware to scale the image, but is still not quite as fast as OpenGL for the same task. Roughly you'll want to look at CGImageCreate

Hardware-accelerated scaling on iOS without OpenGL

2016-11-25 Thread Andreas Falkenhahn
I'm currently writing an iOS backend for a cross-platform program whose platform-independent engine writes all of its graphics into 32-bit pixel buffers, in RGBA order. The alpha byte isn't used. The graphics are always opaque so I don't need alpha blending. What is the most efficient option to