Skip to content

Commit 93fdd63

Browse files
committed
WPF - Fix incorrect param ordering of IRenderHandler.OnPaint
Param order now matches CEF interface
1 parent c51a615 commit 93fdd63

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

CefSharp.Wpf/ChromiumWebBrowser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ protected virtual void OnPaint(bool isPopup, Rect dirtyRect, IntPtr buffer, int
785785

786786
var img = isPopup ? popupImage : image;
787787

788-
RenderHandler?.OnPaint(isPopup, buffer, dirtyRect, width, height, img);
788+
RenderHandler?.OnPaint(isPopup, dirtyRect, buffer, width, height, img);
789789
}
790790

791791
/// <summary>

CefSharp.Wpf/IRenderHandler.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
namespace CefSharp.Wpf
1010
{
11-
/// <summary>
12-
/// Implement this interface to handle Offscreen Rendering (OSR).
13-
/// NOTE: Currently only OnPaint is implemented, at some point expand the API to include all
14-
/// of CefRenderHandler methods http://magpcss.org/ceforum/apidocs3/projects/(default)/CefRenderHandler.html
15-
/// </summary>
16-
public interface IRenderHandler : IDisposable
17-
{
18-
void OnPaint(bool isPopup, IntPtr buffer, Rect dirtyRect, int width, int height, Image image);
19-
}
11+
/// <summary>
12+
/// Implement this interface to handle Offscreen Rendering (OSR).
13+
/// NOTE: Currently only OnPaint is implemented, at some point expand the API to include all
14+
/// of CefRenderHandler methods http://magpcss.org/ceforum/apidocs3/projects/(default)/CefRenderHandler.html
15+
/// </summary>
16+
public interface IRenderHandler : IDisposable
17+
{
18+
void OnPaint(bool isPopup, Rect dirtyRect, IntPtr buffer, int width, int height, Image image);
19+
}
2020
}

CefSharp.Wpf/Rendering/Experimental/ByteArrayWritableBitmapRenderHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public ByteArrayWritableBitmapRenderHandler(double dpiX, double dpiY, bool inval
4949
this.dispatcherPriority = dispatcherPriority;
5050
}
5151

52-
void IRenderHandler.OnPaint(bool isPopup, IntPtr buffer, Rect dirtyRect, int width, int height, Image image)
52+
void IRenderHandler.OnPaint(bool isPopup, Rect dirtyRect, IntPtr buffer, int width, int height, Image image)
5353
{
5454
if (image.Dispatcher.HasShutdownStarted)
5555
{

CefSharp.Wpf/Rendering/Experimental/IncreaseBufferInteropRenderHandler.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ public void Dispose()
5858
ReleaseMemoryMappedView(ref viewMemoryMappedFile, ref viewMemoryMappedViewAccessor);
5959
}
6060

61-
void IRenderHandler.OnPaint(bool isPopup, IntPtr buffer, Rect dirtyRect, int width, int height, Image image)
61+
void IRenderHandler.OnPaint(bool isPopup, Rect dirtyRect, IntPtr buffer, int width, int height, Image image)
6262
{
6363
if (isPopup)
6464
{
65-
CreateOrUpdateBitmap(isPopup, buffer, dirtyRect, width, height, image, ref popupSize, ref popupMemoryMappedFile, ref popupMemoryMappedViewAccessor);
65+
CreateOrUpdateBitmap(isPopup, dirtyRect, buffer, width, height, image, ref popupSize, ref popupMemoryMappedFile, ref popupMemoryMappedViewAccessor);
6666
}
6767
else
6868
{
69-
CreateOrUpdateBitmap(isPopup, buffer, dirtyRect, width, height, image, ref viewSize, ref viewMemoryMappedFile, ref viewMemoryMappedViewAccessor);
69+
CreateOrUpdateBitmap(isPopup, dirtyRect, buffer, width, height, image, ref viewSize, ref viewMemoryMappedFile, ref viewMemoryMappedViewAccessor);
7070
}
7171
}
7272

73-
private void CreateOrUpdateBitmap(bool isPopup, IntPtr buffer, Rect dirtyRect, int width, int height, Image image, ref Size currentSize, ref MemoryMappedFile mappedFile, ref MemoryMappedViewAccessor viewAccessor)
73+
private void CreateOrUpdateBitmap(bool isPopup, Rect dirtyRect, IntPtr buffer, int width, int height, Image image, ref Size currentSize, ref MemoryMappedFile mappedFile, ref MemoryMappedViewAccessor viewAccessor)
7474
{
7575
if (image.Dispatcher.HasShutdownStarted)
7676
{

CefSharp.Wpf/Rendering/InteropBitmapRenderHandler.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ public void Dispose()
5858
ReleaseMemoryMappedView(ref viewMemoryMappedFile, ref viewMemoryMappedViewAccessor);
5959
}
6060

61-
void IRenderHandler.OnPaint(bool isPopup, IntPtr buffer, Rect dirtyRect, int width, int height, Image image)
61+
void IRenderHandler.OnPaint(bool isPopup, Rect dirtyRect, IntPtr buffer, int width, int height, Image image)
6262
{
6363
if (isPopup)
6464
{
65-
CreateOrUpdateBitmap(isPopup, buffer, dirtyRect, width, height, image, ref popupSize, ref popupMemoryMappedFile, ref popupMemoryMappedViewAccessor);
65+
CreateOrUpdateBitmap(isPopup, dirtyRect, buffer, width, height, image, ref popupSize, ref popupMemoryMappedFile, ref popupMemoryMappedViewAccessor);
6666
}
6767
else
6868
{
69-
CreateOrUpdateBitmap(isPopup, buffer, dirtyRect, width, height, image, ref viewSize, ref viewMemoryMappedFile, ref viewMemoryMappedViewAccessor);
69+
CreateOrUpdateBitmap(isPopup, dirtyRect, buffer, width, height, image, ref viewSize, ref viewMemoryMappedFile, ref viewMemoryMappedViewAccessor);
7070
}
7171
}
7272

73-
private void CreateOrUpdateBitmap(bool isPopup, IntPtr buffer, Rect dirtyRect, int width, int height, Image image, ref Size currentSize, ref MemoryMappedFile mappedFile, ref MemoryMappedViewAccessor viewAccessor)
73+
private void CreateOrUpdateBitmap(bool isPopup, Rect dirtyRect, IntPtr buffer, int width, int height, Image image, ref Size currentSize, ref MemoryMappedFile mappedFile, ref MemoryMappedViewAccessor viewAccessor)
7474
{
7575
if (image.Dispatcher.HasShutdownStarted)
7676
{

CefSharp.Wpf/Rendering/WritableBitmapRenderHandler.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@ public void Dispose()
6767
ReleaseMemoryMappedView(ref viewMemoryMappedFile, ref viewMemoryMappedViewAccessor);
6868
}
6969

70-
void IRenderHandler.OnPaint(bool isPopup, IntPtr buffer, Rect dirtyRect, int width, int height, Image image)
70+
void IRenderHandler.OnPaint(bool isPopup, Rect dirtyRect, IntPtr buffer, int width, int height, Image image)
7171
{
7272
if (isPopup)
7373
{
74-
CreateOrUpdateBitmap(isPopup, buffer, dirtyRect, width, height, image, ref popupSize, ref popupMemoryMappedFile, ref popupMemoryMappedViewAccessor);
74+
CreateOrUpdateBitmap(isPopup, dirtyRect, buffer, width, height, image, ref popupSize, ref popupMemoryMappedFile, ref popupMemoryMappedViewAccessor);
7575
}
7676
else
7777
{
78-
CreateOrUpdateBitmap(isPopup, buffer, dirtyRect, width, height, image, ref viewSize, ref viewMemoryMappedFile, ref viewMemoryMappedViewAccessor);
78+
CreateOrUpdateBitmap(isPopup, dirtyRect, buffer, width, height, image, ref viewSize, ref viewMemoryMappedFile, ref viewMemoryMappedViewAccessor);
7979
}
8080
}
8181

82-
private void CreateOrUpdateBitmap(bool isPopup, IntPtr buffer, Rect dirtyRect, int width, int height, Image image, ref Size currentSize, ref MemoryMappedFile mappedFile, ref MemoryMappedViewAccessor viewAccessor)
82+
private void CreateOrUpdateBitmap(bool isPopup, Rect dirtyRect, IntPtr buffer, int width, int height, Image image, ref Size currentSize, ref MemoryMappedFile mappedFile, ref MemoryMappedViewAccessor viewAccessor)
8383
{
8484
bool createNewBitmap = false;
8585

0 commit comments

Comments
 (0)