-
Notifications
You must be signed in to change notification settings - Fork 272
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
ducthiem90
wants to merge
7
commits into
CasparCG:master
from
ducthiem90:html-shared-texture-windows
Closed
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2fbb5e0
Support sharing texture from cef on Windows
ducthiem90 e1f7e91
move the dx11 stuff out to a separate file
ducthiem90 6f0865d
move directx11 to accelerator project
ducthiem90 e785a08
Create cmake for directx11
ducthiem90 29d49aa
create executor for create frame from d3d texture on html producer
ducthiem90 cfb0581
Use WGLEW_NV_DX_interop to copy directx texture to gl texture
ducthiem90 252e108
Move d3d_device_interop to ogl device
ducthiem90 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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") | ||
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") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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") | ||
|
@@ -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") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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