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

Unified Diff: skia/ext/skia_utils_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 | « rlz/mac/lib/machine_id_mac.cc ('k') | skia/ext/skia_utils_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/skia_utils_ios.mm
diff --git a/skia/ext/skia_utils_ios.mm b/skia/ext/skia_utils_ios.mm
index 72c69a02b592b8b9db08d7a0c5e598d33cad0192..80c50fdec216f9ab04e57522c71ecb525326c6ca 100644
--- a/skia/ext/skia_utils_ios.mm
+++ b/skia/ext/skia_utils_ios.mm
@@ -31,13 +31,16 @@ SkBitmap CGImageToSkBitmap(CGImageRef image, CGSize size, bool is_opaque) {
(SK_A32_SHIFT == (a) && SK_R32_SHIFT == (r) \
&& SK_G32_SHIFT == (g) && SK_B32_SHIFT == (b))
#if defined(SK_CPU_LENDIAN) && HAS_ARGB_SHIFTS(24, 16, 8, 0)
- base::mac::ScopedCFTypeRef<CGColorSpaceRef> color_space(
+ base::ScopedCFTypeRef<CGColorSpaceRef> color_space(
CGColorSpaceCreateDeviceRGB());
- base::mac::ScopedCFTypeRef<CGContextRef> context(
- CGBitmapContextCreate(data, size.width, size.height, 8, size.width*4,
- color_space,
- kCGImageAlphaPremultipliedFirst |
- kCGBitmapByteOrder32Host));
+ base::ScopedCFTypeRef<CGContextRef> context(CGBitmapContextCreate(
+ data,
+ size.width,
+ size.height,
+ 8,
+ size.width * 4,
+ color_space,
+ kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
#else
#error We require that Skia's and CoreGraphics's recommended \
image memory layout match.
@@ -62,7 +65,7 @@ UIImage* SkBitmapToUIImageWithColorSpace(const SkBitmap& skia_bitmap,
return nil;
// First convert SkBitmap to CGImageRef.
- base::mac::ScopedCFTypeRef<CGImageRef> cg_image(
+ base::ScopedCFTypeRef<CGImageRef> cg_image(
SkCreateCGImageRefWithColorspace(skia_bitmap, color_space));
// Now convert to UIImage.
@@ -73,16 +76,16 @@ UIImage* SkBitmapToUIImageWithColorSpace(const SkBitmap& skia_bitmap,
std::vector<SkBitmap> ImageDataToSkBitmaps(NSData* image_data) {
DCHECK(image_data);
- base::mac::ScopedCFTypeRef<CFDictionaryRef> empty_dictionary(
+ base::ScopedCFTypeRef<CFDictionaryRef> empty_dictionary(
CFDictionaryCreate(NULL, NULL, NULL, 0, NULL, NULL));
std::vector<SkBitmap> frames;
- base::mac::ScopedCFTypeRef<CGImageSourceRef> source(
+ base::ScopedCFTypeRef<CGImageSourceRef> source(
CGImageSourceCreateWithData((CFDataRef)image_data, empty_dictionary));
size_t count = CGImageSourceGetCount(source);
for (size_t index = 0; index < count; ++index) {
- base::mac::ScopedCFTypeRef<CGImageRef> cg_image(
+ base::ScopedCFTypeRef<CGImageRef> cg_image(
CGImageSourceCreateImageAtIndex(source, index, empty_dictionary));
CGSize size = CGSizeMake(CGImageGetWidth(cg_image),
« no previous file with comments | « rlz/mac/lib/machine_id_mac.cc ('k') | skia/ext/skia_utils_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698