aboutsummaryrefslogtreecommitdiffhomepage
path: root/xcode/hostapp/test.cpp
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2008-12-22 02:33:11 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2008-12-22 02:33:11 +0000
commit2b26cac4fd1a0ff6bfc84757f35198afba3ee1d2 (patch)
treed6052e1048cd753649a076c4d0dd7db3d53cf5a8 /xcode/hostapp/test.cpp
parent0680d6c7caa9c2d4b1e5ee49e5816b96be0cc7bf (diff)
downgrade project files to 10.4 so more clients can use them
downgrade some CG calls in test apps to not require 10.5 apis remove leftover printf in SkOSWindow_Mac.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@42 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'xcode/hostapp/test.cpp')
-rw-r--r--xcode/hostapp/test.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/xcode/hostapp/test.cpp b/xcode/hostapp/test.cpp
index 3b3e11964c..67f833261f 100644
--- a/xcode/hostapp/test.cpp
+++ b/xcode/hostapp/test.cpp
@@ -29,9 +29,15 @@ void SkiaDraw(CGContextRef cg, CGRect bounds) {
gImage = SkCreateCGImageRef(bitmap);
}
- CGColorRef color = CGColorCreateGenericRGB(1, 1, 1, 1);
+ float components[] = { 1, 1, 1, 1 };
+
+ CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
+ CGColorRef color = CGColorCreate(colorspace, components);
+
CGContextSetFillColorWithColor(cg, color);
CGColorRelease(color);
+ CGColorSpaceRelease(colorspace);
+
CGContextFillRect(cg, bounds);
CGRect r = CGRectMake(0, 0, 640, 480);