| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Thanks for the PR 👍 Very cool.
Few comments inline, I think changing the way the cleanup is handled is probably worth actioning.
Doesn't look like the browser would handle any sort of resize, is that correct?
Sorry, something went wrong.
|
|
||
| public D3D11Renderer(int windowWidth, int windowHeight) | ||
| { | ||
| Cef.ShutdownStarted += (_, _) => Destroy(); |
There was a problem hiding this comment.
Given D3D11Renderer appears create an instance per ChromiumWebBrowser instance would it be better if this class implemented IDisposable and was disposed with the ChromiumWebBrowser instance? (Should be able to override Dispose on the OffscreenBrowser class
Sorry, something went wrong.
There was a problem hiding this comment.
Ah, good point. I'll change this right away
Sorry, something went wrong.
| # JetBrains Rider | ||
| *.sln.iml | ||
| /CefSharp.WinForms.Direct3D.Example/obj.netcore | ||
| .idea/ No newline at end of file |
There was a problem hiding this comment.
Is this required?
Sorry, something went wrong.
There was a problem hiding this comment.
It's a rider folder containing project specific settings files, it's not mandatory since I simply can avoid to commit that folder. It was just to make it easier when committing
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the quick response, should be fine to leave.
Sorry, something went wrong.
| var windowInfo = new WindowInfo {WindowlessRenderingEnabled = true, Width = width, Height = height}; | ||
| windowInfo.SharedTextureEnabled = true; | ||
| windowInfo.SetAsWindowless(IntPtr.Zero); | ||
| CreateBrowser(windowInfo, cefBrowserSettings); |
There was a problem hiding this comment.
Just as a general comment I don't recommend calling CreateBrowser in the constructor (was probably a mistake that it ever did). Makes it very difficult to reliably attach event handlers, due to the browser being created async, it's possible to attach them after the browser has been created.
For the example it's probably fine, just pointing it out.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for pointing that out!
Sorry, something went wrong.
You mean for the ResizeWindow method that I wrote in the D3DRenderer class? I wrote that just to show how you can do that if needed. If you think that it's a bit confusing I'll remove it to make it as simple as possible |
Sorry, something went wrong.
If you were to change the ChromiumWebBrowser.Size of the browser, it didn't look like the render handler would deal with the size change. I haven't debugged the code to confirm this, so I could be mistaken. |
Sorry, something went wrong.
As of now I didn't put any resizing in the code, but the ChromiumWebBrowser.Size is only getting changed once before creating the AcceleratedRenderHandler. I'll clarify by putting a Resize flow that also changes the D3DRenderer target to avoid confusion. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
No description provided.