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

Side by Side Diff: skia/ext/skia_utils_mac.h

Issue 6117006: Mac: Explicitly set the colorspace on SkBitmap -> CGImageRef conversions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SKIA_EXT_SKIA_UTILS_MAC_H_ 5 #ifndef SKIA_EXT_SKIA_UTILS_MAC_H_
6 #define SKIA_EXT_SKIA_UTILS_MAC_H_ 6 #define SKIA_EXT_SKIA_UTILS_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #include <CoreGraphics/CGColor.h> 9 #include <CoreGraphics/CGColor.h>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 // Converts ARGB to CGColorRef. 58 // Converts ARGB to CGColorRef.
59 CGColorRef SkColorToCGColorRef(SkColor color); 59 CGColorRef SkColorToCGColorRef(SkColor color);
60 60
61 // Converts a CGImage to a SkBitmap. 61 // Converts a CGImage to a SkBitmap.
62 SkBitmap CGImageToSkBitmap(CGImageRef image); 62 SkBitmap CGImageToSkBitmap(CGImageRef image);
63 63
64 // Draws an NSImage with a given size into a SkBitmap. 64 // Draws an NSImage with a given size into a SkBitmap.
65 SkBitmap NSImageToSkBitmap(NSImage* image, NSSize size, bool is_opaque); 65 SkBitmap NSImageToSkBitmap(NSImage* image, NSSize size, bool is_opaque);
66 66
67 // Given an SkBitmap, return an autoreleased NSImage. 67 // Given an SkBitmap, return an autoreleased NSImage in the generic color space.
68 // DEPRECATED, use SkBitmapToNSImageWithColorSpace() instead.
viettrungluu 2011/01/12 19:02:11 If it's deprecated, you should file a bug (to remo
68 NSImage* SkBitmapToNSImage(const SkBitmap& icon); 69 NSImage* SkBitmapToNSImage(const SkBitmap& icon);
69 70
71 // Given an SkBitmap and a color space, return an autoreleased NSImage.
72 NSImage* SkBitmapToNSImageWithColorSpace(const SkBitmap& icon,
73 CGColorSpaceRef colorSpace);
74
70 // Returns |[NSImage imageNamed:@"NSApplicationIcon"]| as SkBitmap. 75 // Returns |[NSImage imageNamed:@"NSApplicationIcon"]| as SkBitmap.
71 SkBitmap AppplicationIconAtSize(int size); 76 SkBitmap AppplicationIconAtSize(int size);
72 77
73 } // namespace gfx 78 } // namespace gfx
74 79
75 #endif // SKIA_EXT_SKIA_UTILS_MAC_H_ 80 #endif // SKIA_EXT_SKIA_UTILS_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698