Commit ad9efc96 authored by Wei Li's avatar Wei Li Committed by Commit Bot

Warmup text color API for pdf compositor service

Mac sandbox version 1 warms up some system APIs before sandboxing the
process. For pdf compositor service, it needs to use system text color
for lcd text smoothing test. So text color API needs to be warmed up
same as PPAPI process.

We also allow accesses to system color profile for both pdf compositor
service and PPAPI process in Mac sandbox version 2. This allows system
color access, thus prevents bitmap context creation errors caused due to
failed color access.

BUG=822218

Change-Id: I2352588e76e9b8c82d0fa87b3b99b7c897973d6f
Reviewed-on: https://chromium-review.googlesource.com/1014345Reviewed-by: default avatarGreg Kerr <kerrnel@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551116}
parent f5d1e5dd
...@@ -13,3 +13,8 @@ ...@@ -13,3 +13,8 @@
; Needed for Fonts. ; Needed for Fonts.
(allow-font-access) (allow-font-access)
; Reads from /System.
(allow file-read-data
; https://crbug.com/822218
(subpath "/System/Library/ColorSync/Profiles"))
...@@ -24,8 +24,10 @@ ...@@ -24,8 +24,10 @@
; Reads from /System. ; Reads from /System.
(allow file-read-data (allow file-read-data
(path "/System/Library/Colors/System.clr/System.clr")
(subpath "/System/Library/CoreServices/SystemAppearance.bundle") (subpath "/System/Library/CoreServices/SystemAppearance.bundle")
(path "/System/Library/Colors/System.clr/System.clr")) ; https://crbug.com/822218
(subpath "/System/Library/ColorSync/Profiles"))
; Allow the ppapi plugin binaries to be loaded. ; Allow the ppapi plugin binaries to be loaded.
(if (param-defined? ppapi-plugin-0) (if (param-defined? ppapi-plugin-0)
......
...@@ -165,8 +165,11 @@ void SandboxMac::Warmup(SandboxType sandbox_type) { ...@@ -165,8 +165,11 @@ void SandboxMac::Warmup(SandboxType sandbox_type) {
CFTimeZoneCopySystem(); CFTimeZoneCopySystem();
} }
if (sandbox_type == SANDBOX_TYPE_PPAPI) { if (sandbox_type == SANDBOX_TYPE_PPAPI ||
// Preload AppKit color spaces used for Flash/ppapi. http://crbug.com/348304 sandbox_type == SANDBOX_TYPE_PDF_COMPOSITOR) {
// Preload AppKit color spaces used for ppapi(https://crbug.com/348304),
// as well as pdf compositor service likely on version 10.10 or
// older(https://crbug.com/822218).
NSColor* color = [NSColor controlTextColor]; NSColor* color = [NSColor controlTextColor];
[color colorUsingColorSpaceName:NSCalibratedRGBColorSpace]; [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment