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.
- Hide Browser when Disposing, reduce changes of RenderHandler being called
- Add additional IsDisposed check
- Set RenderHandler to null before Disposing
- 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
* 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.
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