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

Unified Diff: chrome/renderer/renderer_main_platform_delegate_mac.mm

Issue 201104: Warm up the generic CMYK profile before building a sandbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/renderer_main_platform_delegate_mac.mm
===================================================================
--- chrome/renderer/renderer_main_platform_delegate_mac.mm (revision 26053)
+++ chrome/renderer/renderer_main_platform_delegate_mac.mm (working copy)
@@ -38,23 +38,25 @@
void SandboxWarmup() {
base::ScopedNSAutoreleasePool scoped_pool;
- { // CGColorSpaceCreateWithName(), CGBitmapContextCreate() - 10.5.6
- CGColorSpaceRef rgb_colorspace =
- CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
+ { // CGColorSpaceCreateWithName(), CGBitmapContextCreate() - 10.5.6
+ scoped_cftyperef<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);
+ // Allocate a 1x1 image.
+ char data[4];
+ scoped_cftyperef<CGContextRef> context(
+ CGBitmapContextCreate(data, 1, 1, 8, 1 * 4,
+ rgb_colorspace,
+ kCGImageAlphaPremultipliedFirst |
+ kCGBitmapByteOrder32Host));
- CGColorSpaceRelease(rgb_colorspace);
- CGContextRelease(tmp);
-
- // load in the color profiles we'll need (as a side effect).
+ // 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698