| Index: ui/gfx/image/image_ios.mm
|
| diff --git a/ui/gfx/image/image_ios.mm b/ui/gfx/image/image_ios.mm
|
| index 1e21bd83a2e5567b1cfe33f0e5bd15fe2d6dade8..e2ff8dc0629be65daa47b39b7b4be5bcd83ad28a 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
|
|
|