summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/renderer_main_platform_delegate_mac.mm
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-13 15:00:44 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-13 15:00:44 +0000
commit72df4df1ebef2bb6b8d29dc4b9800c67ad05009b (patch)
tree2cc3f56b01dae3ae18c46092027d6d441a5c9111 /chrome/renderer/renderer_main_platform_delegate_mac.mm
parentbba38ee0cbe3b1f0bfa0391516cda8287cf71218 (diff)
downloadchromium_src-72df4df1ebef2bb6b8d29dc4b9800c67ad05009b.zip
chromium_src-72df4df1ebef2bb6b8d29dc4b9800c67ad05009b.tar.gz
chromium_src-72df4df1ebef2bb6b8d29dc4b9800c67ad05009b.tar.bz2
Warm up the generic CMYK profile before building a sandbox.
BUG=21114 TEST=http://twitter.com/kuechengoettin, no sad tab on Snow Leopard Review URL: http://codereview.chromium.org/201104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_main_platform_delegate_mac.mm')
-rw-r--r--chrome/renderer/renderer_main_platform_delegate_mac.mm32
1 files changed, 17 insertions, 15 deletions
diff --git a/chrome/renderer/renderer_main_platform_delegate_mac.mm b/chrome/renderer/renderer_main_platform_delegate_mac.mm
index c50a163..247c261 100644
--- a/chrome/renderer/renderer_main_platform_delegate_mac.mm
+++ b/chrome/renderer/renderer_main_platform_delegate_mac.mm
@@ -38,23 +38,25 @@ RendererMainPlatformDelegate::~RendererMainPlatformDelegate() {
void SandboxWarmup() {
base::ScopedNSAutoreleasePool scoped_pool;
- { // CGColorSpaceCreateWithName(), CGBitmapContextCreate() - 10.5.6
- CGColorSpaceRef rgb_colorspace =
- CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
-
- // Allocate a 1 byte image.
- char data[8];
- CGContextRef tmp = CGBitmapContextCreate(data, 1, 1, 8, 1*8,
- rgb_colorspace,
- kCGImageAlphaPremultipliedFirst |
- kCGBitmapByteOrder32Host);
-
- CGColorSpaceRelease(rgb_colorspace);
- CGContextRelease(tmp);
-
- // load in the color profiles we'll need (as a side effect).
+ { // CGColorSpaceCreateWithName(), CGBitmapContextCreate() - 10.5.6
+ scoped_cftyperef<CGColorSpaceRef> rgb_colorspace(
+ CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB));
+
+ // Allocate a 1x1 image.
+ char data[4];
+ scoped_cftyperef<CGContextRef> context(
+ CGBitmapContextCreate(data, 1, 1, 8, 1 * 4,
+ rgb_colorspace,
+ kCGImageAlphaPremultipliedFirst |
+ kCGBitmapByteOrder32Host));
+
+ // Load in the color profiles we'll need (as a side effect).
(void) mac_util::GetSRGBColorSpace();
(void) mac_util::GetSystemColorSpace();
+
+ // CGColorSpaceCreateSystemDefaultCMYK - 10.6
+ scoped_cftyperef<CGColorSpaceRef> cmyk_colorspace(
+ CGColorSpaceCreateWithName(kCGColorSpaceGenericCMYK));
}
{ // [-NSColor colorUsingColorSpaceName] - 10.5.6