Commit Graph

17 Commits

Author SHA1 Message Date
Andrew Bushnell cbc89802ef WPF - WritableBitmapRenderHandler Avoid null bitmap references upon wakeup. (#4619)
Force initial bitmap creation upon wakeup when the image.source is null... Happens if sizing etc. rapidly and the UI thread short circuits when CreateNewBitMap is true and the first wake up occurs with it 'false' amd image.Source is still null...
2023-11-01 06:14:36 +10:00
Alex Maitland becbb9e21d WPF - Exception on wakeup from sleep
Issue #4426
2023-09-02 19:24:32 +10:00
Alex Maitland 71562dddc8 WPF - Add WritableBitmapRenderHandler.CopyOnlyDirtyRect (defaults to false)
- To improve performance we can only copy the part of the DirtyRect that was changed
  currently disabled by default, can be enabled once more testing one.
2022-09-19 14:29:39 +10:00
Alex Maitland 6cf756f25a WPF - WritableBitmapRenderHandler ArgumentOutofRange
Resolves #3474
2021-07-30 10:29:52 +10:00
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 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
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
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