Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support sharing texture from cef on Windows #1217

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/CMakeModules/Bootstrap_Windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ casparcg_add_runtime_dependency("${LIBERATION_FONTS_BIN_PATH}/LiberationMono-Reg

# CEF
if (ENABLE_HTML)
set(CEF_INCLUDE_PATH "${NUGET_PACKAGES_FOLDER}/cef.sdk.3.3239.1723/CEF")
set(CEF_BIN_PATH "${NUGET_PACKAGES_FOLDER}/cef.redist.x64.3.3239.1723/CEF")
set(CEF_RESOURCE_PATH "${NUGET_PACKAGES_FOLDER}/cef.redist.x64.3.3239.1723/CEF")
link_directories("${NUGET_PACKAGES_FOLDER}/cef.sdk.3.3239.1723/CEF/x64")
set(CEF_INCLUDE_PATH "${NUGET_PACKAGES_FOLDER}/cef.sdk.3.3578.1870/CEF")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason for this version of CEF? There look to be newer on nuget. I ask because I will need to bump to 74 sometime soon for #669

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested in cef 74, but cef 74 seem have bug with fps, it render very fast

set(CEF_BIN_PATH "${NUGET_PACKAGES_FOLDER}/cef.redist.x64.3.3578.1870/CEF")
set(CEF_RESOURCE_PATH "${NUGET_PACKAGES_FOLDER}/cef.redist.x64.3.3578.1870/CEF")
link_directories("${NUGET_PACKAGES_FOLDER}/cef.sdk.3.3578.1870/CEF/x64")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should bump this to cef 73. Newer than that has issues, but I havent found any in 73 yet.


casparcg_add_runtime_dependency("${CEF_RESOURCE_PATH}/locales")
casparcg_add_runtime_dependency("${CEF_RESOURCE_PATH}/swiftshader")
Expand All @@ -169,6 +169,7 @@ if (ENABLE_HTML)
casparcg_add_runtime_dependency("${CEF_RESOURCE_PATH}/icudtl.dat")
casparcg_add_runtime_dependency("${CEF_BIN_PATH}/natives_blob.bin")
casparcg_add_runtime_dependency("${CEF_BIN_PATH}/snapshot_blob.bin")
casparcg_add_runtime_dependency("${CEF_BIN_PATH}/v8_context_snapshot.bin")
casparcg_add_runtime_dependency("${CEF_BIN_PATH}/libcef.dll")
casparcg_add_runtime_dependency("${CEF_BIN_PATH}/chrome_elf.dll")
casparcg_add_runtime_dependency("${CEF_BIN_PATH}/d3dcompiler_47.dll")
Expand Down
11 changes: 10 additions & 1 deletion src/modules/html/html.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,16 @@ void init(core::module_dependencies dependencies)
#ifdef WIN32
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST);
#endif
const bool enable_gpu = env::properties().get(L"configuration.html.enable-gpu", false);
const bool enable_gpu = env::properties().get(L"configuration.html.enable-gpu", false);

#ifdef WIN32
if (enable_gpu) {
auto dev = dx11_device::get_device();
if (!dev)
CASPAR_LOG(warning) << L"Failed to create directX device";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This log line could be better

}
#endif

CefSettings settings;
settings.command_line_args_disabled = false;
settings.no_sandbox = true;
Expand Down
4 changes: 2 additions & 2 deletions src/modules/html/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="boost" version="1.66.0.0" targetFramework="native" />
<package id="cef.redist.x64" version="3.3239.1723" targetFramework="native" />
<package id="cef.sdk" version="3.3239.1723" targetFramework="native" />
<package id="cef.redist.x64" version="3.3578.1870" targetFramework="native" />
<package id="cef.sdk" version="3.3578.1870" targetFramework="native" />
</packages>
Loading