Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(886)

Unified Diff: ui/gfx/image/image_ios.mm

Issue 16917011: mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with fixed off-by-1 in git-clang-format Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/color_profile_mac.cc ('k') | ui/gfx/image/image_skia_util_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/gfx/color_profile_mac.cc ('k') | ui/gfx/image/image_skia_util_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698