Commit Graph

6 Commits

Author SHA1 Message Date
amaitland 6d438d6504 WPF - Add lock to AbstractRenderHandler Dispose
Was trying to avoid adding a lock, unfortunately it's still possible for the CopyMemory function to be called
after the MemoryMappedFile has been Disposed.
2019-09-07 15:12:59 +10:00
amaitland ea714b327c WPF - Additional RenderHandler Dispose Improvements
- Hide Browser when Disposing, reduce changes of RenderHandler being called
- Add additional IsDisposed check
- Set RenderHandler to null before Disposing
2019-09-07 14:02:10 +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
amaitland 4a145bf363 WPF ByteArrayWritableBitmapRenderHandler - Remove base class
AbstractRenderHandler - change pixel properties to internal so they can be shared ByteArrayWritableBitmapRenderHandler
WritableBitmapRenderHandler - run Format Document (changed fields to read only)

Follow up to #2652
2019-03-01 13:19:35 +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