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

Unified Diff: ui/base/resource/resource_bundle_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/base/clipboard/clipboard_mac.mm ('k') | ui/gfx/blit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle_ios.mm
diff --git a/ui/base/resource/resource_bundle_ios.mm b/ui/base/resource/resource_bundle_ios.mm
index f4919d76f58cf3f3c3551bf5547ecd6d8175b2ab..d9f1fb5437c9deaae98d692f81721cd067312d30 100644
--- a/ui/base/resource/resource_bundle_ios.mm
+++ b/ui/base/resource/resource_bundle_ios.mm
@@ -135,15 +135,16 @@ gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
CGSize source_size = [ui_image size];
CGSize target_size = CGSizeMake(source_size.width * target_scale,
source_size.height * target_scale);
- base::mac::ScopedCFTypeRef<CGColorSpaceRef> color_space(
+ base::ScopedCFTypeRef<CGColorSpaceRef> color_space(
CGColorSpaceCreateDeviceRGB());
- base::mac::ScopedCFTypeRef<CGContextRef> context(
- CGBitmapContextCreate(
- NULL,
- target_size.width, target_size.height,
- 8, target_size.width * 4,
- color_space,
- kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
+ base::ScopedCFTypeRef<CGContextRef> context(CGBitmapContextCreate(
+ NULL,
+ target_size.width,
+ target_size.height,
+ 8,
+ target_size.width * 4,
+ color_space,
+ kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
CGRect target_rect = CGRectMake(0, 0,
target_size.width, target_size.height);
@@ -158,7 +159,7 @@ gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
CGContextFillRect(context, target_rect);
}
- base::mac::ScopedCFTypeRef<CGImageRef> cg_image(
+ base::ScopedCFTypeRef<CGImageRef> cg_image(
CGBitmapContextCreateImage(context));
ui_image.reset([[UIImage alloc] initWithCGImage:cg_image
scale:target_scale
« no previous file with comments | « ui/base/clipboard/clipboard_mac.mm ('k') | ui/gfx/blit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698