Was using Array.Resize to modify the existing array, unfortunately this doesn't yield the performance result the name implies.
A new array is created and copies elements from the old array, so performance is actually worse than allocating a new array.
For now we'll just create a new empty array.
https://msdn.microsoft.com/en-us/library/bb348051(v=vs.110).aspx
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.
OffScreen
- Now maintains a raw Byte[] buffer that is used to create the GDI bitmaps
can be overridden and raw buffer access granted (eliminates the forced memory copy to the memory mapped view)
WPF
- MemoryMappedFile.CreateNew is now used to create the in memory view and copy the buffer
- InteropBitmapFactory only create new MemoryMappedFile selectively. If the MemoryMappedFile is larger than we require then just reuse it rather than
releasing then allocating a smaller section of memory that's used for double buffering with InteropBitmap and WritableBitmap
- Removed CefDirtyRect and used existing Rect class
- Rename rendering event to Paint, still preferable to implement IBitmapFactory or subclass ChromiumWebBrowser
- Update ChromiumWebBrowserWithScreenshotSupport to support new rendering method - not very well tested.
Resolves#2237