-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
DirectX rendering #2108
Comments
This sounds like a great improvement. Only my opinion but I would add it to the current wpf project, as CEFSharp doesn't have different projects for different technologies and default to bitmap rendering. Then you could have a enum that allows you to select directx. |
Hello guys! I'm using CefSharp in my project (big thanks for your work, it's great project!) for playing video from YouTube, but perfomance is so poor. I'm beginner in WPF and my question: is this trouble by bitmap rendering? Thank you for answer. |
@alphamax, does this behave properly when using DPI scaling? |
@bjarteskogoy I have deactivated the "DPI" problem, i mean, in my company we do not need defferent rendering in case of DPI change. |
@alphamax Thank you. I would like to test the improvements. Could you provide some nuget package or something? |
I have an ALTERNATE repo located here : Hope it helps you. |
I'm using CEFSharp for showing webGL inside my WPF project. |
@alphamax Thanks for an interesting contribution. Would you care to outline some of the major improvements in the DirectX version? (like, 3-5 bulletpoints) Just so we know what was the main reason for you doing it; I'm sure there were good reasons but let's just be explicit here. Especially since people seems to have given it a try and not really understood the main point of it, it could make sense. |
The With the changes I just committed as part of #2237 it's now possible to access the raw buffer exposed by the
With the new changes anyone should be able to subclass When |
@perlun , sorry for my late response :) @amaitland This is a great news, this will improve the rendering process and i think it will be easier to inject data in textures with this changes. I need to update our code and propose a fully packaged pull request now. |
@perlun do i try to propose a pull request ? |
Anyone interested ? :) |
Yes |
1 similar comment
Yes |
There is a new CEF PR that adds actual directx support at https://bitbucket.org/chromiumembedded/cef/pull-requests/158/support-external-textures-in-osr-mode/diff If/when that is merged we can look at adding support to CefSharp main repository, as no extra libs should be required, just expose a couple of extra methods. Short term if you are committed to support and maintenance then we can create a CefSharp.Wpf.DirectX repository within the overarching CefSharp project here on GitHib. I think the added dependencies and the specialized knowledge required make it ideal to host as a subproject and be published as a separate Nuget package that depends on the current set of Nuget packages. |
Sounds like a good plan. Do you think the new nuget package also add be able to add directx to offscreen? |
@GrabzIt Not sure how the two are related? With the
This
My comment above relates this branch, where the bitmap is coped into memory, then copied into a texture/surface. I haven't done any performance analysis, I'm somewhat skeptical that it will actually yield amazing performance improvements, it's still limited by the same I've also seen one report that |
Yesterday i had a look on the separated rendering system. It is a great. I have created a DirectXBitmapRenderHandler & tested it. Seems to work great on my side. Once again, It is a great improvement and the PR 158 is very interesting ! |
Hi, @alphamax found incorrect match for 'RuntimeLibrary': value 'MTd_StaticDebug' does not match 'MDd_DynamicDebug' in AssemblyInfo.obj CefSharp.Core in ...\libcef_dll_wrapper. lib Any suggestions? |
Hello, First point, you may try on master branch. You should build without problems (reply if not). On master, i move everything on v63:
Second point : your error come from a wrong version of the cef wrapper. It is due to a wrong flag on the command line for this specific utilisation. If you checkout and, without any changes, there is this error: blame me. I should fail replacing all wrappers properly in the solution. If you dont want to move to 63, i will fix this issue. What platform are you trying to build ? Debug or Release ? Thanks (ps on master, cef v63 have gpu rendering optimisation pull request & cefsharp may be rendered on directX texture) |
Hello @alphamax , Thanks |
Hello @cristiancarli No you do not need anything special. If it does not compile immediately, i need to fix it. Regards, |
Hello @cristiancarli It was totally my fault, i did not deactivate Nuget for the CEF packages. I also did not commit the entire workload of CEF (due to gitignore). You can now test again. I tryied on a fresh new cloned repo and it succeed. Feel free to reply if you have any problems. |
Hi @alphamax , Regards. |
Hi @alphamax , I see that there is the new version of cefsharp (65), do you think it is difficult to bring these features into the new version? |
Hi @cristiancarli , At this time we do not choose vif we stay in 63 or move in v65 (we might prefer 65). Regards, |
The changes were only merged into |
HI, we found and issue (crash) of v65 with DirextX render and touch fix 👍 and click onto the language dropdown. You’ll get this error: |
I will have a look as soon as I can :) |
Hi @alphamax I found a problem in a dropdown menu, if i click on the button to open it the menu opens correctly but then im not able to select one option in the menu (using touch input, instead with mouse works correctly) Best regards! |
Well thanks for your feedback. I already gave a way to fix it to another person. I just detect when popup is open and handle a touch as a mouse click (through Cef primitives). |
Is directx released yet in any version of CefSharp or I need to use alphamax's fork? I have a webgl page and it is chewing up a lot of cpu from all that bitmap copying even though the actual rendering is in GPU. |
@rukiman No. For best performance I still recommend using the Now #2527 has been resolved someone with experience in |
Does anyone have news about select box issue ? Regards |
I ended up setting the windowless frame rate to 20 and also reducing the dimensions of the webview as much as possible as I am using a transparent background webgl page. This brought down my cpu to acceptable levels. In case anyone wants a work around. I'm using the standard WPF CefSharp version. |
Thanks for the tips !
2019-01-17 0:56 UTC+01:00, rukiman <[email protected]>:
…> Is directx released yet in any version of CefSharp or I need to use
> alphamax's fork? I have a webgl page and it is chewing up a lot of cpu
> from all that bitmap copying even though the actual rendering is in GPU.
I ended up setting the windowless frame rate to 20 and also reducing the
dimensions of the webview as much as possible as I am using a transparent
background webgl page. This brought down my cpu to acceptable levels. In
case anyone wants a work around.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#2108 (comment)
|
Hi sorry to bother you but can you link or quote the solution you gave to this bug so we can try to resolve it ourself ? |
I am sorry, the code I speak about belongs to my client, I can't link it because I don't have the right to give it. Best regards, Benjamin |
Hi, thanks for the tip, we manage to resolve the bug. Best regards |
Yes you should be able to, but you may wait V71 to be more integrated (thanks to new integration of texture). |
Hi. Is there any update on DirectX rendering support? My webgl app is a bit sluggish on CefSharp. |
I have created #2770 to track adding support for DirectX rendering, I am looking for volunteers to help out. Please only comment if you are willing and able to help. |
Hello,
It is not a real Issue but a way to propose modifications.
I have made changes on CefSharp in a multiple way :
I think the two last points are now temporary work and Cef55 binaries are available on this repository : https://github.com/intuilab/CefSharp/tree/55-Touch-DirectX in Nuget folders.
I want to know how to propose the first point. Do you prefer a new "Cef.WPF.DirectX" project and people can chose it ? do you prefer it in the already existing Cef.WPF project ?
Another question, do you want an adaptative rendering system (if DirectX is to lame, switch on bitmap rendering) ?
Thanks for you ideas !
The text was updated successfully, but these errors were encountered: