Add bindings to the private `CGSNewRegionWithRectList` and `CGSSetSurfaceShape` APIs, and improve ergonomics of the geometry types.
These changes allow us to set rounded corners on OpenGL views the same way Cocoa does, dramatically improving performance.
r? @metajack
cc @paulrouget
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/51)
<!-- Reviewable:end -->
Support serialization of `CGFont` objects.
Due to API limitations, this will only serialize native fonts, not Web
fonts. Specifically, there is no way I know of to fetch the
`CGDataProvider` associated with a `CGFont`. This isn't a problem for
Servo, however, because Servo knows which fonts are Web fonts and stores
their byte data separately.
r? @glennw or @larsbergstrom
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/46)
<!-- Reviewable:end -->
Due to API limitations, this will only serialize native fonts, not Web
fonts. Specifically, there is no way I know of to fetch the
`CGDataProvider` associated with a `CGFont`. This isn't a problem for
Servo, however, because Servo knows which fonts are Web fonts and stores
their byte data separately.
Fix CGFloat type definition for 32-bit
`CGFloat` was always defined as a double, and there was a `TODO` to fix this. I ran into the issue, so here's a PR to fix it :)
The definition for `CGFloat` in CoreGraphics/CGBase.h looks like:
``` c
#if defined(__LP64__) && __LP64__
# define CGFLOAT_TYPE double
#else
# define CGFLOAT_TYPE float
#endif
typedef CGFLOAT_TYPE CGFloat;
```
I also noticed that the definition for `boolean_t` was wrong for arm. The definition in mach/arm/boolean.h is:
``` c
typedef int boolean_t;
```
And the definition in mach/i386/boolean.h is:
``` c
#if defined(__x86_64__) && !defined(KERNEL)
typedef unsigned int boolean_t;
#else
typedef int boolean_t;
#endif
```
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/42)
<!-- Reviewable:end -->
Bump version to 0.1.1
Bump version to 0.1.1 so that I can use this crate with #39 from crates.io.
If this is merge could someone also publish to crates.io?
Made core-foundation a dependency for any platform
The Cargo.toml file currently only declares `core-foundation` as a dependency on 64bit OSX, but it's used unconditionally in this crate so it should be an unconditional dependency.
I'm playing around with this crate on iOS and it won't build without this change.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/39)
<!-- Reviewable:end -->