Closed PatTheMav closed 3 years ago
This requires our planned CEF 4183 update to work.
After a quick chat with @pkviet we decided to add a BROWSER_LEGACY
flag that will allow to easily fall back on 3770-era behaviour.
I'll also investigate adding a similar flag to the build scripts and Github workflow to allow a fallback if excrements start hitting a blade-based appliance.
Added the BROWSER_LEGACY
flag, it's automatically set by the updated scripts in https://github.com/obsproject/obs-studio/pull/3805 if CEF_BUILD_VERSION=3770
or lower is defined.
@pkviet have you tested this branch locally? If so, please mark it as approved.
There are still a few fixes missing that I noticed while dogfooding this, will push an update tomorrow/later.
After defeating clang_format
once more, I successfully pushed the small changes I made recently. With those:
CefScopedLibraryLoader
is used, which requires the helper-app infrastructure to workCefEnableHighDPISupport
has been disabled for other platformsThe second commit adds the BROWSER_LEGACY
flag to all those changes, "undoing" them if set.
The third commit adds a little change required to make texture sharing work with CEF 4183 later.
Just pushed a new iteration of the commits - main changes:
SHARED_TEXTURE_SUPPORT_ENABLED
is now a simple define set by cmake
, no futzing around with a pre-configured header file now (it's also not really that experimental anymore)CefExecuteProcess
is only executed on Windows, it should not be called on macOS due to its helper-process architectureSendExternalBeginFrame
doesn't seem to work properly on macOS, so I made it a Windows-only feature for nowIOSurface
does not have pre-multiplied alpha, so OBS_EFFECT_DEFAULT_RECT
is used if texture sharing is enabledBROWSER_LEGACY
which, combined with CEF v3770, allows building a "last-known good" version of the pluginI'll give this a whirl with different build configs tomorrow, but it's looking good so far. With SendExternalBeginFrame
disabled I was not able to get the GPU Helper to crash and got solid 60fps in FishGL with 200+ fish and somewhere between 4-8% CPU and ~20% GPU usage (GPU Helper + OBS itself).
Description
This PR adds the necessary build-system changes for modern CEF versions running on macOS and re-enables features.
Motivation and Context
To ensure compatibility with macOS Catalina and beyond Chromium requires to be run via multiple processes on macOS with the single-process model not being supported anymore.
As such Chromium requires 3 additional helper apps to exist (GPU, Plugin and Renderer) and also the main helper to be packaged in a macOS app bundle. The helpers also require specific entitlements to allow JIT compilation.
This PR adds the necessary changes to cmake to build these helpers. Changes to OBS packaging are also required but are addressed in a PR on the main repo.
Note: The helpers for all intents and purposes replace
obs-browser-page
on macOS. Also the option to deploy the browser is now assumed by default as CEF will not run when not linked/placed in a macOS app bundle.How Has This Been Tested?
Types of changes
Checklist: