Index: base/mac_util.h |
diff --git a/base/mac_util.h b/base/mac_util.h |
index 4be3c895b996fdeee7168e6e01a596ce754dba0b..d50e9e3cf9aa924fccad2ffb3d3acda6f5f65dee 100644 |
--- a/base/mac_util.h |
+++ b/base/mac_util.h |
@@ -17,6 +17,7 @@ class FilePath; |
@class NSWindow; |
#else |
class NSBundle; |
+class NSImage; |
class NSWindow; |
#endif |
@@ -141,6 +142,13 @@ CFTypeRef GetValueFromDictionary(CFDictionaryRef dict, |
// Sets the process name as displayed in Activity Monitor to process_name. |
void SetProcessName(CFStringRef process_name); |
+// Converts a NSImage to a CGImageRef. Normally, the system frameworks can do |
+// this fine, especially on 10.6. On 10.5, however, CGImage cannot handle |
+// converting a PDF-backed NSImage into a CGImageRef. This function will |
+// rasterize the PDF into a bitmap CGImage. The caller is responsible for |
+// releasing the return value. |
+CGImageRef CopyNSImageToCGImage(NSImage* image); |
+ |
} // namespace mac_util |
#endif // BASE_MAC_UTIL_H_ |