discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GSoC 2012: Week 7


From: Ivan Vučica
Subject: GSoC 2012: Week 7
Date: Mon, 11 Jun 2012 02:15:26 +0200

Hi!

It's time for yet another awesome GSoC report!

* I ended up spending a lot of time exploring how exactly Apple's
implementation is behaving regarding properties such as .bounds,
.position, .contents, .contentsRect, .anchorPoint, how setNeedsDisplay
affects things, etc. As it turns out, there's a lot of gotchas, but I
think I understand most of them.
* Looks like Apple's implementation uses something called
CABackingStore when delegate-based rendering is used. At least that's
what NSLog(@"%@", layer.contents); prints out. There's no
documentation about it. Since that's obviously something private, I
don't see any issues with temporarily sticking to putting CGContextRef
into contents.
* Sticking CGContextRef into .contents probably can't be permanent...
because .contents property is animatable. There's a small fade
animation when changing contents (no matter how the contents were
changed, via painting something different in the delegate or by
directly setting .contents). Perhaps we can get around it by having
presentationLayer keep the old image + new image, and fade during the
animation. I'll explore this when the time for that comes.
* A single CGContextRef can freely be used by all layers -- that's
what Apple seems to do. Backing stores are different, but context is
used all around the place.

* I added many CATransform3D functions; these implement 4x4 matrix math.
* Transform and position of a layer are now respected
* Anchor point is respected.
* CGContext state is now stored and restored before letting delegate
paint into the context. Layer is also clipped.
* Demo cleaned up and updated to demonstrate transforms (a 45 deg
rotation) and use of .position

Upcoming:
* sublayers support (respecting transform, sublayerTransform, position
and anchorPoint)
* contentsRect support, at some point; this pulls in need to support
contentsGravity as well, but it should all consist of some trivial
playing with vertices and texture coordinates.
* queueing a render only when it's really needed (currently demos are
painting continuously, via NSTimer)
* animations! (that, of course, means having presentationLayers!)
* at some random point, an Xcode project for testing demos under OS X
(an Xcode target being used for each demo)

Overall, not much actual checked-in code this week, but I have a ton
of notes and a small OS X app that I used in studying how these
properties behave. Somehow I suspect these are not really interesting.
Unless someone really, really wants to see them :-)
-- 
Ivan Vučica - ivan@vucica.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]