13 Commits

Author SHA1 Message Date
amaitland b24efd2853 WPF - Resize Glitches (Image glitches during resize)
- WritableBitmapRenderHandler/InteropBitmapRenderHandler ignore update if size doesn't match

It's possible that OnPaint is called multiple times before our BeginInvoke call is marshalled onto the UI Thread.
In those cases we check width/height and ignore the call if it doesn't match

Issue #3114
2020-10-30 14:30:35 +10:00
amaitland a8119cc145 WPF - InteropBitmapRenderHandler always create new buffer
InteropBitmap is strangely glitching on resize when reusing the same buffer as detailed in https://github.com/cefsharp/CefSharp/issues/3114#issuecomment-717334316
Go back to the old method approach of creating a new buffer for every resize operation.

Revert part of commit https://github.com/cefsharp/CefSharp/commit/b1bd7499e578f2486ad1c49f0b4bdc93c63d790f#diff-10ce38e86ac5782d06a15b191dc6216fd098f3e23fe1fa88b3711761d8944055

InteropBitmapRenderHandler will no longer be the default shortly.

Issue #3114
2020-10-28 13:26:36 +10:00
amaitland b1bd7499e5 WPF - Interop/WritableBitmapRenderHandler memory allocation improvement
If the MemoryMappedFile is smaller than we need then create a larger one
2019-09-07 12:15:49 +10:00
amaitland b1b930605c WPF - Replace RtlCopyMemory p/invoke with NativeMethodWrapper.MemoryCopy
- RtlCopyMemory only works on x64, we could use the slower RtlMoveMemory, going with a native wrapper around RtlCopyMemory
- Renamed CopyMemoryUsingHandle to MemoryCopy (cannot be CopyMemory or RtlCopyMemory as macro with that name already exists)

https://github.com/cefsharp/CefSharp/pull/2885#issuecomment-529033351

Issue #2885
2019-09-07 09:02:30 +10:00
Konstantin Preißer c311a581e6 WPF - Modify CopyMemory EntryPoint to work with .Net Core (#2885)
* Fix the entrypoint declaration for CopyMemory.

Contributes to #2796

* Follow-Up: Switch to RtlCopyMemory which is faster, but requires that the buffers do not overlap.
2019-09-06 13:15:47 +10:00
Chris 5c292cd707 WPF - Refactor RenderHandler implementations (#2652)
* WPF - Refactored the RenderHandler implementations

* Added a AbstractRenderHandler
* Refactored the RenderHandlers to inherit from AbstractRenderHandler
* Implemented the correct and thread safe dispose pattern

* WPF - AbstractRenderHandler updated xml documentation

* WPF - ByteArrayWritableBitmapRenderHandler: Removed incorrect PixelFormat

* WPF - AbstractRenderHandler: Added missing GC.SuppressFinalize
2019-03-01 13:03:52 +10:00
amaitland bbf7795d80 WPF/OffScreen - Add OnAcceleratedPaint
Exposes the CEF API for Shared D3D11 Texture support. This should be considered experimental as there are quite a few known bugs in the CEF implementation
(PDF Viewer not working correctly)

OffScreen.ChromiumWebBrowser.CreateBrowser API changed (breaking change) now pass in `WindowInfo` to customise settings
Refactor CreateBrowser to support windowed and OSR rendering (now accepts IWindowInfo)

Resolves #2527
2018-12-16 19:37:12 +10:00
maloshuk 5622809d68 WPF - Change PixelFormat from Bgra32 to Pbgra32 to fix control transparency (#2589)
* WPF - set PixelFormats.Pbgra32 for all rendering methods #2127
2018-12-07 19:42:54 +10:00
Chris bef5dd37c4 Maintenance - Fixed formatting, file encoding, and copyright year (#2504)
* Applied formatting

* Fixed file encoding + Updated copyright year

* Updated License

* Fixed more file encoding

* Copyright notice now shows the year the file was created
2018-09-10 10:41:13 +10:00
amaitland 28f43261b6 Xml Doc - Add more comments and fixes 2018-09-05 13:02:43 +10:00
amaitland 93fdd63525 WPF - Fix incorrect param ordering of IRenderHandler.OnPaint
Param order now matches CEF interface
2018-04-23 13:06:05 +10:00
amaitland c1b89c62e9 WPF/OffScreen - Code cleanup and minor refactor
IRenderWebBrowser - Method naming now matches CEF, xmldoc updated to be more accurate

CefSharp.Wpf.ChromiumWebBrowser and CefSharp.OffScreen.ChromiumWebBrowser both updated as a result of IRenderWebBrowser changes
Should be minimal public API changes, should only require changes for those that are implementing their own rendering, who will have a major rewrite on their hands regardless of this.
2018-04-20 14:49:25 +10:00
amaitland 895ad8d94f WPF OSR - Rename IBitmapFactory to IRenderHandler
At some point it would be nice to expose the whole of the CefRenderHandler API, this should at some point make that easier.

Issue #2237
2018-03-21 14:36:30 +10:00