diff options
Diffstat (limited to 'ui/gfx/image/image_ios.mm')
-rw-r--r-- | ui/gfx/image/image_ios.mm | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/ui/gfx/image/image_ios.mm b/ui/gfx/image/image_ios.mm index 1e21bd8..e2ff8dc 100644 --- a/ui/gfx/image/image_ios.mm +++ b/ui/gfx/image/image_ios.mm @@ -27,20 +27,19 @@ namespace { // Caller takes ownership of returned UIImage. UIImage* CreateErrorUIImage(float scale) { LOG(ERROR) << "Unable to decode PNG into UIImage."; - base::mac::ScopedCFTypeRef<CGColorSpaceRef> color_space( + base::ScopedCFTypeRef<CGColorSpaceRef> color_space( CGColorSpaceCreateDeviceRGB()); - base::mac::ScopedCFTypeRef<CGContextRef> context( - CGBitmapContextCreate(NULL, // Allow CG to allocate memory. - 16, // width - 16, // height - 8, // bitsPerComponent - 0, // CG will calculate by default. - color_space, - kCGImageAlphaPremultipliedFirst | - kCGBitmapByteOrder32Host)); + base::ScopedCFTypeRef<CGContextRef> context(CGBitmapContextCreate( + NULL, // Allow CG to allocate memory. + 16, // width + 16, // height + 8, // bitsPerComponent + 0, // CG will calculate by default. + color_space, + kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host)); CGContextSetRGBFillColor(context, 1.0, 0.0, 0.0, 1.0); CGContextFillRect(context, CGRectMake(0.0, 0.0, 16, 16)); - base::mac::ScopedCFTypeRef<CGImageRef> cg_image( + base::ScopedCFTypeRef<CGImageRef> cg_image( CGBitmapContextCreateImage(context)); return [[UIImage imageWithCGImage:cg_image.get() scale:scale |