Commit 45fe99b7 authored by Zhenyao Mo's avatar Zhenyao Mo Committed by Commit Bot

Revert "Allow loading SwiftShader after sandbox init on Mac"

This reverts commit be9cde47.

Reason for revert: broke media lab bots

Original change's description:
> Allow loading SwiftShader after sandbox init on Mac
> 
> We could blacklist WebGL based on GL version, which is after creating a context.
> 
> Right now this will trigger a failure and GPU process will exit and then
> relaunch with SwiftShader mode, which pre-load SwiftShader before sandbox init.
> 
> So users will not notice, but this GPU process exit and relaunch is less optimal
> and unnecessary.
> 
> BUG=897914
> TEST=manual
> R=​kerrnel@chromium.org,kbr@chromium.org,sugoi@chromium.org
> 
> Change-Id: Idcd018ca1f2e5161002cdae4563462c76316c606
> Reviewed-on: https://chromium-review.googlesource.com/c/1297481
> Reviewed-by: Alexis Hétu <sugoi@chromium.org>
> Reviewed-by: Greg Kerr <kerrnel@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#602391}

TBR=sugoi@chromium.org,zmo@chromium.org,kbr@chromium.org,kerrnel@chromium.org,rsesek@chromium.org

Change-Id: Ib9ab22645f1727249db8f3f9a007cc76402e6067
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 897914
Reviewed-on: https://chromium-review.googlesource.com/c/1298419Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602457}
parent fa3ffde0
...@@ -12,3 +12,6 @@ class GpuProcessExpectations(GpuTestExpectations): ...@@ -12,3 +12,6 @@ class GpuProcessExpectations(GpuTestExpectations):
# Seems to have become flaky on Windows recently. # Seems to have become flaky on Windows recently.
self.Flaky('GpuProcess_one_extra_workaround', ['win'], bug=700522) self.Flaky('GpuProcess_one_extra_workaround', ['win'], bug=700522)
self.Fail('GpuProcess_feature_status_under_swiftshader',
['mac'], bug=897914)
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
(allow file-read* (extension "com.apple.app-sandbox.read")) (allow file-read* (extension "com.apple.app-sandbox.read"))
; Allow to read framework and CDM resources files for CDM host verification ; Allow to read framework and CDM resources files for CDM host verification
(define bundle-version-path "BUNDLE_VERSION_PATH")
(allow file-read* (subpath (param bundle-version-path))) (allow file-read* (subpath (param bundle-version-path)))
; mach IPC ; mach IPC
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
(define (param-defined? str) (string? (param str))) (define (param-defined? str) (string? (param str)))
; Define constants for all of the parameter strings passed in. ; Define constants for all of the parameter strings passed in.
(define bundle-version-path "BUNDLE_VERSION_PATH")
(define disable-sandbox-denial-logging "DISABLE_SANDBOX_DENIAL_LOGGING") (define disable-sandbox-denial-logging "DISABLE_SANDBOX_DENIAL_LOGGING")
(define enable-logging "ENABLE_LOGGING") (define enable-logging "ENABLE_LOGGING")
(define homedir-as-literal "USER_HOMEDIR_AS_LITERAL") (define homedir-as-literal "USER_HOMEDIR_AS_LITERAL")
......
...@@ -28,7 +28,4 @@ ...@@ -28,7 +28,4 @@
(allow file-read* (subpath "/System/Library/Extensions"))) (allow file-read* (subpath "/System/Library/Extensions")))
; Needed for VideoToolbox usage - https://crbug.com/767037 ; Needed for VideoToolbox usage - https://crbug.com/767037
(allow mach-lookup (global-name "com.apple.coremedia.videodecoder")) (allow mach-lookup (global-name "com.apple.coremedia.videodecoder"))
\ No newline at end of file
; Needed for GPU process to fallback to SwiftShader - https://crbug.com/897914
(allow file-read-data file-read-metadata (subpath (param bundle-version-path)))
...@@ -242,8 +242,7 @@ bool SandboxMac::Enable(SandboxType sandbox_type) { ...@@ -242,8 +242,7 @@ bool SandboxMac::Enable(SandboxType sandbox_type) {
if (!compiler.InsertBooleanParam(kSandboxMacOS1013, macos_1013)) if (!compiler.InsertBooleanParam(kSandboxMacOS1013, macos_1013))
return false; return false;
if (sandbox_type == service_manager::SANDBOX_TYPE_CDM || if (sandbox_type == service_manager::SANDBOX_TYPE_CDM) {
sandbox_type == service_manager::SANDBOX_TYPE_GPU) {
base::FilePath bundle_path = SandboxMac::GetCanonicalPath( base::FilePath bundle_path = SandboxMac::GetCanonicalPath(
base::mac::FrameworkBundlePath().DirName()); base::mac::FrameworkBundlePath().DirName());
if (!compiler.InsertStringParam(kSandboxBundleVersionPath, if (!compiler.InsertStringParam(kSandboxBundleVersionPath,
......
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