diff options
Diffstat (limited to 'xcode/hostapp/test.cpp')
-rw-r--r-- | xcode/hostapp/test.cpp | 8 |
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); |