[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Opal, CGLayer and OpenGL in UIKit
From: |
David Chisnall |
Subject: |
Re: Opal, CGLayer and OpenGL in UIKit |
Date: |
Fri, 30 Sep 2011 18:00:44 +0100 |
On 30 Sep 2011, at 17:48, Ivan Vučica wrote:
> Hi,
>
> I've been reading the Apple docs on Quartz/CoreGraphics, and I've stumbled
> upon CGLayer. Upon first look, it looks like CGLayer is already implemented.
>
> My first thought is that perhaps we don't need to actually use OpenGL when
> implementing UIKit, at least not initially. What do you guys think?
CGLayer is implemented, but it currently only does the very basic stuff. It
currently uses a Cairo pattern to allow it to be composited. This works, but
it's going to be fairly slow. UIKit (and modern AppKit) do a lot more. For
example, even the very basic swoosh effect as you slide a layer off the screen
is going to require compositing the texture a few dozen times. This can be
very fast in OpenGL, but is likely to be slow with Cairo. CoreAnimation wants
to move layers around in 3D space (well, rotate them in 3D, move them in 2D),
while CoreImage wants to run shader programs on them. All of these things are
trivial with OpenGL, but very hard in Cairo.
So, in theory it's possible, but in practice it will be hard.
David
--
This email complies with ISO 3103