Commit Graph

8 Commits

Author SHA1 Message Date
amaitland 3cb5c119fa OffScreen - Remove obsolete methods
- Removed ChromiumWebBrowser methods OnPaint, OnCursorChange, StartDragging, UpdateDragCursor, OnPopupShow, OnPopupSize, OnImeCompositionRangeChanged
Access to that functionality is available through CefSharp.OffScreen.IRenderHandler, you can subclass the DefaultRenderHandler implementation should you require.
- Improve the xml doc for OnPaintEventArgs and some other methods

Resolves #2598
2018-12-17 13:41:05 +10:00
Chris 30ee538ce0 Added EditorConfig (#2514) 2018-09-17 00:46:21 +02: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 13bafa709b OffScreen - Untabify 2018-08-24 19:13:59 +10:00
amaitland 8bc9e25e11 OffScreen - BitmapBuffer.CreateBitmap create new bitmap and copy buffer to it's back buffer
Bitmap was not a true snapshot of the image, the backbuffer being updated would change the image
2018-08-24 19:12:53 +10:00
amaitland 0f6d70226e OffScreen - Simplify BitmapBuffer.ResizeBuffer
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
2018-05-17 14:22:40 +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 127c00554f Rewrite WPF/OffScreen OnPaint
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
2018-01-18 11:29:12 +10:00