From 635eedb58f694893e0e1b6847112ea3c094d09fc Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Fri, 3 May 2024 18:45:50 +1000 Subject: [PATCH] Upgrade to 124.3.1+g6d871a1+chromium-124.0.6367.60 / Chromium 124.0.6367.60 --- ...arp.BrowserSubprocess.Core.netcore.vcxproj | 2 +- .../CefSharp.BrowserSubprocess.Core.vcxproj | 2 +- CefSharp.BrowserSubprocess.Core/Resource.rc | 8 +++---- ...ges.CefSharp.BrowserSubprocess.Core.config | 2 +- ...harp.BrowserSubprocess.Core.netcore.config | 2 +- CefSharp.BrowserSubprocess/app.manifest | 2 +- .../CefSharp.Core.Runtime.netcore.vcxproj | 2 +- .../CefSharp.Core.Runtime.vcxproj | 2 +- .../Internals/ClientAdapter.cpp | 4 ++-- .../Internals/ClientAdapter.h | 2 +- .../Internals/RenderClientAdapter.h | 4 ++-- CefSharp.Core.Runtime/Resource.rc | 8 +++---- .../packages.CefSharp.Core.Runtime.config | 2 +- ...kages.CefSharp.Core.Runtime.netcore.config | 2 +- .../Handlers/ExampleRequestHandler.cs | 2 +- .../OnRenderProcessTerminatedEventArgs.cs | 8 +++++-- .../RequestEventHandler.cs | 4 ++-- .../CefSharp.OffScreen.Example.csproj | 2 +- .../CefSharp.OffScreen.Example.netcore.csproj | 2 +- CefSharp.OffScreen.Example/app.manifest | 2 +- CefSharp.OffScreen/ChromiumWebBrowser.cs | 12 +++-------- CefSharp.OffScreen/DefaultRenderHandler.cs | 13 ++++++++++-- CefSharp.OffScreen/IRenderHandler.cs | 13 ++++++++++-- CefSharp.Test/CefSharp.Test.csproj | 2 +- CefSharp.Test/CefSharp.Test.netcore.csproj | 2 +- .../CefSharp.WinForms.Example.csproj | 2 +- .../CefSharp.WinForms.Example.netcore.csproj | 2 +- CefSharp.WinForms.Example/app.manifest | 2 +- .../CefSharp.Wpf.Example.csproj | 2 +- .../CefSharp.Wpf.Example.netcore.csproj | 2 +- CefSharp.Wpf.Example/app.manifest | 2 +- CefSharp.Wpf/ChromiumWebBrowser.cs | 21 +++++++++++++------ CefSharp.Wpf/IRenderHandler.cs | 15 ++++++++++--- .../Rendering/AbstractRenderHandler.cs | 10 ++------- ...AllocHGlobalWritableBitmapRenderHandler.cs | 3 ++- .../DirectWritableBitmapRenderHandler.cs | 5 ++++- .../ByteArrayWritableBitmapRenderHandler.cs | 10 ++------- .../CompositionTargetRenderHandler.cs | 5 ++++- CefSharp.shfbproj | 4 ++-- CefSharp/AcceleratedPaintInfo.cs | 13 ++++++++++++ CefSharp/Handler/IRequestHandler.cs | 4 +++- CefSharp/Handler/RequestHandler.cs | 8 ++++--- CefSharp/Internals/IRenderWebBrowser.cs | 13 ++++++++++-- CefSharp/Properties/AssemblyInfo.cs | 4 ++-- .../CefSharp.Common.app.config.x64.transform | 2 +- .../CefSharp.Common.app.config.x86.transform | 2 +- .../CefSharp.Common.NETCore.targets | 12 +++++------ UpdateNugetPackages.ps1 | 2 +- appveyor.yml | 2 +- build.ps1 | 4 ++-- 50 files changed, 156 insertions(+), 101 deletions(-) create mode 100644 CefSharp/AcceleratedPaintInfo.cs diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj index 2b5c0e9f9..806a59d9a 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj index fe1eb121b..36cd26ddf 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.BrowserSubprocess.Core/Resource.rc b/CefSharp.BrowserSubprocess.Core/Resource.rc index 75bb03d02..8e7064179 100644 --- a/CefSharp.BrowserSubprocess.Core/Resource.rc +++ b/CefSharp.BrowserSubprocess.Core/Resource.rc @@ -1,8 +1,8 @@ #pragma code_page(65001) 1 VERSIONINFO - FILEVERSION 123,0,60 - PRODUCTVERSION 123,0,60 + FILEVERSION 124,3,10 + PRODUCTVERSION 124,3,10 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -18,10 +18,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "CefSharp.BrowserSubprocess.Core" - VALUE "FileVersion", "123.0.60" + VALUE "FileVersion", "124.3.10" VALUE "LegalCopyright", "Copyright © 2023 The CefSharp Authors" VALUE "ProductName", "CefSharp" - VALUE "ProductVersion", "123.0.60" + VALUE "ProductVersion", "124.3.10" END END BLOCK "VarFileInfo" diff --git a/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.config b/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.config index eb1ff9f99..85dc42095 100644 --- a/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.config +++ b/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.config @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.netcore.config b/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.netcore.config index ab98327f0..94fb62d12 100644 --- a/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.netcore.config +++ b/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.netcore.config @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.BrowserSubprocess/app.manifest b/CefSharp.BrowserSubprocess/app.manifest index 0ae5c769d..b371ad3b8 100644 --- a/CefSharp.BrowserSubprocess/app.manifest +++ b/CefSharp.BrowserSubprocess/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj index 737479561..b7936875a 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj index 5c6f6fb62..cb4e5f3d2 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.Core.Runtime/Internals/ClientAdapter.cpp b/CefSharp.Core.Runtime/Internals/ClientAdapter.cpp index 2816a5185..c0e029bac 100644 --- a/CefSharp.Core.Runtime/Internals/ClientAdapter.cpp +++ b/CefSharp.Core.Runtime/Internals/ClientAdapter.cpp @@ -699,7 +699,7 @@ namespace CefSharp } } - void ClientAdapter::OnRenderProcessTerminated(CefRefPtr browser, TerminationStatus status) + void ClientAdapter::OnRenderProcessTerminated(CefRefPtr browser, TerminationStatus status, int errorCode, const CefString& errorString) { auto handler = _browserControl->RequestHandler; @@ -707,7 +707,7 @@ namespace CefSharp { auto browserWrapper = GetBrowserWrapper(browser->GetIdentifier(), browser->IsPopup()); - handler->OnRenderProcessTerminated(_browserControl, browserWrapper, (CefTerminationStatus)status); + handler->OnRenderProcessTerminated(_browserControl, browserWrapper, (CefTerminationStatus)status, errorCode, StringUtils::ToClr(errorString)); } } diff --git a/CefSharp.Core.Runtime/Internals/ClientAdapter.h b/CefSharp.Core.Runtime/Internals/ClientAdapter.h index c82e12138..a07ad3215 100644 --- a/CefSharp.Core.Runtime/Internals/ClientAdapter.h +++ b/CefSharp.Core.Runtime/Internals/ClientAdapter.h @@ -135,7 +135,7 @@ namespace CefSharp virtual DECL bool OnSelectClientCertificate(CefRefPtr browser, bool isProxy, const CefString& host, int port, const CefRequestHandler::X509CertificateList& certificates, CefRefPtr callback) override; virtual DECL void OnRenderViewReady(CefRefPtr browser) override; - virtual DECL void OnRenderProcessTerminated(CefRefPtr browser, TerminationStatus status) override; + virtual DECL void OnRenderProcessTerminated(CefRefPtr browser, TerminationStatus status, int errorCode, const CefString& errorString) override; virtual DECL void OnDocumentAvailableInMainFrame(CefRefPtr browser) override; // CefDisplayHandler diff --git a/CefSharp.Core.Runtime/Internals/RenderClientAdapter.h b/CefSharp.Core.Runtime/Internals/RenderClientAdapter.h index b1c3ebc86..02f259480 100644 --- a/CefSharp.Core.Runtime/Internals/RenderClientAdapter.h +++ b/CefSharp.Core.Runtime/Internals/RenderClientAdapter.h @@ -150,10 +150,10 @@ namespace CefSharp _renderWebBrowser->OnPopupSize(Rect(rect.x, rect.y, rect.width, rect.height)); }; - virtual DECL void OnAcceleratedPaint(CefRefPtr browser, PaintElementType type, const RectList& dirtyRects, void* shared_handle) override + virtual DECL void OnAcceleratedPaint(CefRefPtr browser, PaintElementType type, const RectList& dirtyRects, const CefAcceleratedPaintInfo& info) override { CefRect r = dirtyRects.front(); - _renderWebBrowser->OnAcceleratedPaint((CefSharp::PaintElementType)type, CefSharp::Structs::Rect(r.x, r.y, r.width, r.height), IntPtr((void *)shared_handle)); + _renderWebBrowser->OnAcceleratedPaint((CefSharp::PaintElementType)type, CefSharp::Structs::Rect(r.x, r.y, r.width, r.height), nullptr); } virtual DECL void OnPaint(CefRefPtr browser, PaintElementType type, const RectList& dirtyRects, diff --git a/CefSharp.Core.Runtime/Resource.rc b/CefSharp.Core.Runtime/Resource.rc index 92ece3306..09833414a 100644 --- a/CefSharp.Core.Runtime/Resource.rc +++ b/CefSharp.Core.Runtime/Resource.rc @@ -1,8 +1,8 @@ #pragma code_page(65001) 1 VERSIONINFO - FILEVERSION 123,0,60 - PRODUCTVERSION 123,0,60 + FILEVERSION 124,3,10 + PRODUCTVERSION 124,3,10 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -18,10 +18,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "CefSharp.Core" - VALUE "FileVersion", "123.0.60" + VALUE "FileVersion", "124.3.10" VALUE "LegalCopyright", "Copyright © 2023 The CefSharp Authors" VALUE "ProductName", "CefSharp" - VALUE "ProductVersion", "123.0.60" + VALUE "ProductVersion", "124.3.10" END END BLOCK "VarFileInfo" diff --git a/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.config b/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.config index eb1ff9f99..85dc42095 100644 --- a/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.config +++ b/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.config @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.netcore.config b/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.netcore.config index ab98327f0..94fb62d12 100644 --- a/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.netcore.config +++ b/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.netcore.config @@ -1,6 +1,6 @@  - + diff --git a/CefSharp.Example/Handlers/ExampleRequestHandler.cs b/CefSharp.Example/Handlers/ExampleRequestHandler.cs index 19e6b5ee4..a6b8e207f 100644 --- a/CefSharp.Example/Handlers/ExampleRequestHandler.cs +++ b/CefSharp.Example/Handlers/ExampleRequestHandler.cs @@ -104,7 +104,7 @@ namespace CefSharp.Example.Handlers //return false; } - protected override void OnRenderProcessTerminated(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status) + protected override void OnRenderProcessTerminated(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status, int errorCode, string errorMessage) { // TODO: Add your own code here for handling scenarios where the Render Process terminated for one reason or another. chromiumWebBrowser.Load(CefExample.RenderProcessCrashedUrl); diff --git a/CefSharp.Example/RequestEventHandler/EventArgs/OnRenderProcessTerminatedEventArgs.cs b/CefSharp.Example/RequestEventHandler/EventArgs/OnRenderProcessTerminatedEventArgs.cs index f143c8856..b6c3c4883 100644 --- a/CefSharp.Example/RequestEventHandler/EventArgs/OnRenderProcessTerminatedEventArgs.cs +++ b/CefSharp.Example/RequestEventHandler/EventArgs/OnRenderProcessTerminatedEventArgs.cs @@ -6,12 +6,16 @@ namespace CefSharp.Example.RequestEventHandler { public class OnRenderProcessTerminatedEventArgs : BaseRequestEventArgs { - public OnRenderProcessTerminatedEventArgs(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status) + public OnRenderProcessTerminatedEventArgs(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status, int errorCode, string errorString) : base(chromiumWebBrowser, browser) { Status = status; + ErrorCode = errorCode; + ErrorString = errorString; } - public CefTerminationStatus Status { get; private set; } + public CefTerminationStatus Status { get; } + public int ErrorCode { get; } + public string ErrorString { get; } } } diff --git a/CefSharp.Example/RequestEventHandler/RequestEventHandler.cs b/CefSharp.Example/RequestEventHandler/RequestEventHandler.cs index 1c2fae0a1..248813a5a 100644 --- a/CefSharp.Example/RequestEventHandler/RequestEventHandler.cs +++ b/CefSharp.Example/RequestEventHandler/RequestEventHandler.cs @@ -63,9 +63,9 @@ namespace CefSharp.Example.RequestEventHandler return args.ContinueAsync; } - protected override void OnRenderProcessTerminated(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status) + protected override void OnRenderProcessTerminated(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status, int errorCode, string errorMessage) { - var args = new OnRenderProcessTerminatedEventArgs(chromiumWebBrowser, browser, status); + var args = new OnRenderProcessTerminatedEventArgs(chromiumWebBrowser, browser, status, errorCode, errorMessage); OnRenderProcessTerminatedEvent?.Invoke(this, args); } diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj index 64b27f328..d6c92cfe3 100644 --- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj +++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj @@ -23,7 +23,7 @@ - + diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj index 62bd39a53..e249e5d7d 100644 --- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj +++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj @@ -39,7 +39,7 @@ - + diff --git a/CefSharp.OffScreen.Example/app.manifest b/CefSharp.OffScreen.Example/app.manifest index 13da1936b..02253bb7f 100644 --- a/CefSharp.OffScreen.Example/app.manifest +++ b/CefSharp.OffScreen.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs index 50bbbff05..08d7c8ed8 100644 --- a/CefSharp.OffScreen/ChromiumWebBrowser.cs +++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs @@ -874,16 +874,10 @@ namespace CefSharp.OffScreen return RenderHandler?.GetScreenPoint(viewX, viewY, out screenX, out screenY) ?? false; } - /// - /// Called when an element has been rendered to the shared texture handle. - /// This method is only called when is set to true - /// - /// indicates whether the element is the view or the popup widget. - /// contains the set of rectangles in pixel coordinates that need to be repainted - /// is the handle for a D3D11 Texture2D that can be accessed via ID3D11Device using the OpenSharedResource method. - void IRenderWebBrowser.OnAcceleratedPaint(PaintElementType type, Rect dirtyRect, IntPtr sharedHandle) + /// + void IRenderWebBrowser.OnAcceleratedPaint(PaintElementType type, Rect dirtyRect, AcceleratedPaintInfo acceleratedPaintInfo) { - RenderHandler?.OnAcceleratedPaint(type, dirtyRect, sharedHandle); + RenderHandler?.OnAcceleratedPaint(type, dirtyRect, acceleratedPaintInfo); } /// diff --git a/CefSharp.OffScreen/DefaultRenderHandler.cs b/CefSharp.OffScreen/DefaultRenderHandler.cs index 791938c09..6ca022e9e 100644 --- a/CefSharp.OffScreen/DefaultRenderHandler.cs +++ b/CefSharp.OffScreen/DefaultRenderHandler.cs @@ -149,11 +149,20 @@ namespace CefSharp.OffScreen /// /// Called when an element has been rendered to the shared texture handle. /// This method is only called when is set to true + /// + /// The underlying implementation uses a pool to deliver frames. As a result, + /// the handle may differ every frame depending on how many frames are + /// in-progress. The handle's resource cannot be cached and cannot be accessed + /// outside of this callback. It should be reopened each time this callback is + /// executed and the contents should be copied to a texture owned by the + /// client application. The contents of acceleratedPaintInfo + /// will be released back to the pool after this callback returns. /// /// indicates whether the element is the view or the popup widget. /// contains the set of rectangles in pixel coordinates that need to be repainted - /// is the handle for a D3D11 Texture2D that can be accessed via ID3D11Device using the OpenSharedResource method. - public virtual void OnAcceleratedPaint(PaintElementType type, Rect dirtyRect, IntPtr sharedHandle) + /// contains the shared handle; on Windows it is a + /// HANDLE to a texture that can be opened with D3D11 OpenSharedResource. + public virtual void OnAcceleratedPaint(PaintElementType type, Rect dirtyRect, AcceleratedPaintInfo acceleratedPaintInfo) { //NOT USED } diff --git a/CefSharp.OffScreen/IRenderHandler.cs b/CefSharp.OffScreen/IRenderHandler.cs index a0fb32755..e7367eaab 100644 --- a/CefSharp.OffScreen/IRenderHandler.cs +++ b/CefSharp.OffScreen/IRenderHandler.cs @@ -43,11 +43,20 @@ namespace CefSharp.OffScreen /// /// Called when an element has been rendered to the shared texture handle. /// This method is only called when is set to true + /// + /// The underlying implementation uses a pool to deliver frames. As a result, + /// the handle may differ every frame depending on how many frames are + /// in-progress. The handle's resource cannot be cached and cannot be accessed + /// outside of this callback. It should be reopened each time this callback is + /// executed and the contents should be copied to a texture owned by the + /// client application. The contents of acceleratedPaintInfo + /// will be released back to the pool after this callback returns. /// /// indicates whether the element is the view or the popup widget. /// contains the set of rectangles in pixel coordinates that need to be repainted - /// is the handle for a D3D11 Texture2D that can be accessed via ID3D11Device using the OpenSharedResource method. - void OnAcceleratedPaint(PaintElementType type, Rect dirtyRect, IntPtr sharedHandle); + /// contains the shared handle; on Windows it is a + /// HANDLE to a texture that can be opened with D3D11 OpenSharedResource. + void OnAcceleratedPaint(PaintElementType type, Rect dirtyRect, AcceleratedPaintInfo acceleratedPaintInfo); /// /// Called when an element should be painted. Pixel values passed to this method are scaled relative to view coordinates based on the diff --git a/CefSharp.Test/CefSharp.Test.csproj b/CefSharp.Test/CefSharp.Test.csproj index 2c96c9413..351bfcc39 100644 --- a/CefSharp.Test/CefSharp.Test.csproj +++ b/CefSharp.Test/CefSharp.Test.csproj @@ -36,7 +36,7 @@ - + diff --git a/CefSharp.Test/CefSharp.Test.netcore.csproj b/CefSharp.Test/CefSharp.Test.netcore.csproj index 97a387a88..f7edc7e77 100644 --- a/CefSharp.Test/CefSharp.Test.netcore.csproj +++ b/CefSharp.Test/CefSharp.Test.netcore.csproj @@ -35,7 +35,7 @@ - + diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj index 148611f07..abfeb5f17 100644 --- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj +++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj @@ -32,7 +32,7 @@ - + diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj index 69d370d09..0fd454200 100644 --- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj +++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj @@ -39,7 +39,7 @@ - + diff --git a/CefSharp.WinForms.Example/app.manifest b/CefSharp.WinForms.Example/app.manifest index f4a97890c..dc97e56e0 100644 --- a/CefSharp.WinForms.Example/app.manifest +++ b/CefSharp.WinForms.Example/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj index 9c6a80171..d21d955ab 100644 --- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj +++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj @@ -31,7 +31,7 @@ - + diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj index 97e1514ca..943799a24 100644 --- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj +++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj @@ -40,7 +40,7 @@ - + diff --git a/CefSharp.Wpf.Example/app.manifest b/CefSharp.Wpf.Example/app.manifest index f0066cdf3..0216b8d53 100644 --- a/CefSharp.Wpf.Example/app.manifest +++ b/CefSharp.Wpf.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs index d3a00d913..f66e4e08d 100644 --- a/CefSharp.Wpf/ChromiumWebBrowser.cs +++ b/CefSharp.Wpf/ChromiumWebBrowser.cs @@ -951,21 +951,30 @@ namespace CefSharp.Wpf } /// - void IRenderWebBrowser.OnAcceleratedPaint(PaintElementType type, Rect dirtyRect, IntPtr sharedHandle) + void IRenderWebBrowser.OnAcceleratedPaint(PaintElementType type, Rect dirtyRect, AcceleratedPaintInfo acceleratedPaintInfo) { - OnAcceleratedPaint(type == PaintElementType.Popup, dirtyRect, sharedHandle); + OnAcceleratedPaint(type == PaintElementType.Popup, dirtyRect, acceleratedPaintInfo); } /// /// Called when an element has been rendered to the shared texture handle. /// This method is only called when is set to true + /// + /// The underlying implementation uses a pool to deliver frames. As a result, + /// the handle may differ every frame depending on how many frames are + /// in-progress. The handle's resource cannot be cached and cannot be accessed + /// outside of this callback. It should be reopened each time this callback is + /// executed and the contents should be copied to a texture owned by the + /// client application. The contents of acceleratedPaintInfo + /// will be released back to the pool after this callback returns. /// - /// indicates whether the element is the view or the popup widget. + /// indicates whether the element is the view or the popup widget. /// contains the set of rectangles in pixel coordinates that need to be repainted - /// is the handle for a D3D11 Texture2D that can be accessed via ID3D11Device using the OpenSharedResource method. - protected virtual void OnAcceleratedPaint(bool isPopup, Rect dirtyRect, IntPtr sharedHandle) + /// contains the shared handle; on Windows it is a + /// HANDLE to a texture that can be opened with D3D11 OpenSharedResource. + protected virtual void OnAcceleratedPaint(bool isPopup, Rect dirtyRect, AcceleratedPaintInfo acceleratedPaintInfo) { - RenderHandler?.OnAcceleratedPaint(isPopup, dirtyRect, sharedHandle); + RenderHandler?.OnAcceleratedPaint(isPopup, dirtyRect, acceleratedPaintInfo); } /// diff --git a/CefSharp.Wpf/IRenderHandler.cs b/CefSharp.Wpf/IRenderHandler.cs index ef4ebdc49..f4c3bc921 100644 --- a/CefSharp.Wpf/IRenderHandler.cs +++ b/CefSharp.Wpf/IRenderHandler.cs @@ -18,11 +18,20 @@ namespace CefSharp.Wpf /// /// Called when an element has been rendered to the shared texture handle. /// This method is only called when is set to true + /// + /// The underlying implementation uses a pool to deliver frames. As a result, + /// the handle may differ every frame depending on how many frames are + /// in-progress. The handle's resource cannot be cached and cannot be accessed + /// outside of this callback. It should be reopened each time this callback is + /// executed and the contents should be copied to a texture owned by the + /// client application. The contents of acceleratedPaintInfo + /// will be released back to the pool after this callback returns. /// - /// indicates whether the element is the view or the popup widget. + /// indicates whether the element is the view or the popup widget. /// contains the set of rectangles in pixel coordinates that need to be repainted - /// is the handle for a D3D11 Texture2D that can be accessed via ID3D11Device using the OpenSharedResource method. - void OnAcceleratedPaint(bool isPopup, Rect dirtyRect, IntPtr sharedHandle); + /// contains the shared handle; on Windows it is a + /// HANDLE to a texture that can be opened with D3D11 OpenSharedResource. + void OnAcceleratedPaint(bool isPopup, Rect dirtyRect, AcceleratedPaintInfo acceleratedPaintInfo); /// /// Called when an element should be painted. (Invoked from CefRenderHandler.OnPaint) diff --git a/CefSharp.Wpf/Rendering/AbstractRenderHandler.cs b/CefSharp.Wpf/Rendering/AbstractRenderHandler.cs index aea6f850c..733936c7c 100644 --- a/CefSharp.Wpf/Rendering/AbstractRenderHandler.cs +++ b/CefSharp.Wpf/Rendering/AbstractRenderHandler.cs @@ -98,14 +98,8 @@ namespace CefSharp.Wpf.Rendering } } - /// - /// Called when an element has been rendered to the shared texture handle. - /// This method is only called when is set to true - /// - /// indicates whether the element is the view or the popup widget. - /// contains the set of rectangles in pixel coordinates that need to be repainted - /// is the handle for a D3D11 Texture2D that can be accessed via ID3D11Device using the OpenSharedResource method. - public virtual void OnAcceleratedPaint(bool isPopup, Rect dirtyRect, IntPtr sharedHandle) + /// + public virtual void OnAcceleratedPaint(bool isPopup, Rect dirtyRect, AcceleratedPaintInfo acceleratedPaintInfo) { // NOT USED } diff --git a/CefSharp.Wpf/Rendering/AllocHGlobalWritableBitmapRenderHandler.cs b/CefSharp.Wpf/Rendering/AllocHGlobalWritableBitmapRenderHandler.cs index 0ef696b89..fd2df70a4 100644 --- a/CefSharp.Wpf/Rendering/AllocHGlobalWritableBitmapRenderHandler.cs +++ b/CefSharp.Wpf/Rendering/AllocHGlobalWritableBitmapRenderHandler.cs @@ -96,7 +96,8 @@ namespace CefSharp.Wpf.Rendering } } - void IRenderHandler.OnAcceleratedPaint(bool isPopup, Rect dirtyRect, IntPtr sharedHandle) + /// + void IRenderHandler.OnAcceleratedPaint(bool isPopup, Rect dirtyRect, AcceleratedPaintInfo acceleratedPaintInfo) { //NOT USED } diff --git a/CefSharp.Wpf/Rendering/DirectWritableBitmapRenderHandler.cs b/CefSharp.Wpf/Rendering/DirectWritableBitmapRenderHandler.cs index 27c8354a2..ef4ac6396 100644 --- a/CefSharp.Wpf/Rendering/DirectWritableBitmapRenderHandler.cs +++ b/CefSharp.Wpf/Rendering/DirectWritableBitmapRenderHandler.cs @@ -42,16 +42,19 @@ namespace CefSharp.Wpf.Rendering this.invalidateDirtyRect = invalidateDirtyRect; } + /// void IDisposable.Dispose() { } - void IRenderHandler.OnAcceleratedPaint(bool isPopup, Rect dirtyRect, IntPtr sharedHandle) + /// + void IRenderHandler.OnAcceleratedPaint(bool isPopup, Rect dirtyRect, AcceleratedPaintInfo acceleratedPaintInfo) { throw new NotImplementedException(); } + /// void IRenderHandler.OnPaint(bool isPopup, Rect dirtyRect, IntPtr buffer, int width, int height, Image image) { var writeableBitmap = image.Source as WriteableBitmap; diff --git a/CefSharp.Wpf/Rendering/Experimental/ByteArrayWritableBitmapRenderHandler.cs b/CefSharp.Wpf/Rendering/Experimental/ByteArrayWritableBitmapRenderHandler.cs index ac29271a2..e7e136143 100644 --- a/CefSharp.Wpf/Rendering/Experimental/ByteArrayWritableBitmapRenderHandler.cs +++ b/CefSharp.Wpf/Rendering/Experimental/ByteArrayWritableBitmapRenderHandler.cs @@ -42,14 +42,8 @@ namespace CefSharp.Wpf.Rendering.Experimental this.dispatcherPriority = dispatcherPriority; } - /// - /// Called when an element has been rendered to the shared texture handle. - /// This method is only called when is set to true - /// - /// indicates whether the element is the view or the popup widget. - /// contains the set of rectangles in pixel coordinates that need to be repainted - /// is the handle for a D3D11 Texture2D that can be accessed via ID3D11Device using the OpenSharedResource method. - void IRenderHandler.OnAcceleratedPaint(bool isPopup, Rect dirtyRect, IntPtr sharedHandle) + /// + void IRenderHandler.OnAcceleratedPaint(bool isPopup, Rect dirtyRect, AcceleratedPaintInfo acceleratedPaintInfo) { //NOT USED } diff --git a/CefSharp.Wpf/Rendering/Experimental/CompositionTargetRenderHandler.cs b/CefSharp.Wpf/Rendering/Experimental/CompositionTargetRenderHandler.cs index c4dd852b5..9acc261ac 100644 --- a/CefSharp.Wpf/Rendering/Experimental/CompositionTargetRenderHandler.cs +++ b/CefSharp.Wpf/Rendering/Experimental/CompositionTargetRenderHandler.cs @@ -59,6 +59,7 @@ namespace CefSharp.Wpf.Rendering.Experimental } } + /// void IDisposable.Dispose() { CompositionTarget.Rendering -= OnRendering; @@ -78,11 +79,13 @@ namespace CefSharp.Wpf.Rendering.Experimental } } - void IRenderHandler.OnAcceleratedPaint(bool isPopup, Rect dirtyRect, IntPtr sharedHandle) + /// + void IRenderHandler.OnAcceleratedPaint(bool isPopup, Rect dirtyRect, AcceleratedPaintInfo acceleratedPaintInfo) { throw new NotImplementedException(); } + /// void IRenderHandler.OnPaint(bool isPopup, Rect dirtyRect, IntPtr buffer, int width, int height, Image image) { if (image.Dispatcher.HasShutdownStarted) diff --git a/CefSharp.shfbproj b/CefSharp.shfbproj index e982b91b6..beb7b8182 100644 --- a/CefSharp.shfbproj +++ b/CefSharp.shfbproj @@ -31,7 +31,7 @@ - 123.0.60 + 124.3.10 2 False C#, Managed C++ @@ -59,7 +59,7 @@ InheritedMembers, InheritedFrameworkMembers, Protected, ProtectedInternalAsProtected, EditorBrowsableNever, NonBrowsable - Version 123.0.60 + Version 124.3.10 https://raw.githubusercontent.com/cefsharp/CefSharp/master/LICENSE Interfaces, enums, structs and classes that make up the core API interface diff --git a/CefSharp/AcceleratedPaintInfo.cs b/CefSharp/AcceleratedPaintInfo.cs new file mode 100644 index 000000000..d0e1e6391 --- /dev/null +++ b/CefSharp/AcceleratedPaintInfo.cs @@ -0,0 +1,13 @@ +// Copyright © 2024 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +namespace CefSharp +{ + /// + /// AcceleratedPaintInfo + /// + public sealed class AcceleratedPaintInfo + { + } +} diff --git a/CefSharp/Handler/IRequestHandler.cs b/CefSharp/Handler/IRequestHandler.cs index d9f2859fc..f89f7d498 100644 --- a/CefSharp/Handler/IRequestHandler.cs +++ b/CefSharp/Handler/IRequestHandler.cs @@ -135,6 +135,8 @@ namespace CefSharp /// The ChromiumWebBrowser control /// the browser object /// indicates how the process terminated. - void OnRenderProcessTerminated(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status); + /// error code + /// error message + void OnRenderProcessTerminated(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status, int errorCode, string errorMessage); } } diff --git a/CefSharp/Handler/RequestHandler.cs b/CefSharp/Handler/RequestHandler.cs index e93460579..bf13837b8 100644 --- a/CefSharp/Handler/RequestHandler.cs +++ b/CefSharp/Handler/RequestHandler.cs @@ -205,9 +205,9 @@ namespace CefSharp.Handler } /// - void IRequestHandler.OnRenderProcessTerminated(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status) + void IRequestHandler.OnRenderProcessTerminated(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status, int errorCode, string errorMessage) { - OnRenderProcessTerminated(chromiumWebBrowser, browser, status); + OnRenderProcessTerminated(chromiumWebBrowser, browser, status, errorCode, errorMessage); } /// @@ -216,7 +216,9 @@ namespace CefSharp.Handler /// The ChromiumWebBrowser control. /// the browser object. /// indicates how the process terminated. - protected virtual void OnRenderProcessTerminated(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status) + /// error code + /// error message + protected virtual void OnRenderProcessTerminated(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status, int errorCode, string errorMessage) { } diff --git a/CefSharp/Internals/IRenderWebBrowser.cs b/CefSharp/Internals/IRenderWebBrowser.cs index 93e030922..5fc11a323 100644 --- a/CefSharp/Internals/IRenderWebBrowser.cs +++ b/CefSharp/Internals/IRenderWebBrowser.cs @@ -49,11 +49,20 @@ namespace CefSharp.Internals /// /// Called when an element has been rendered to the shared texture handle. /// This method is only called when is set to true + /// + /// The underlying implementation uses a pool to deliver frames. As a result, + /// the handle may differ every frame depending on how many frames are + /// in-progress. The handle's resource cannot be cached and cannot be accessed + /// outside of this callback. It should be reopened each time this callback is + /// executed and the contents should be copied to a texture owned by the + /// client application. The contents of acceleratedPaintInfo + /// will be released back to the pool after this callback returns. /// /// indicates whether the element is the view or the popup widget. /// contains the set of rectangles in pixel coordinates that need to be repainted - /// is the handle for a D3D11 Texture2D that can be accessed via ID3D11Device using the OpenSharedResource method. - void OnAcceleratedPaint(PaintElementType type, Rect dirtyRect, IntPtr sharedHandle); + /// contains the shared handle; on Windows it is a + /// HANDLE to a texture that can be opened with D3D11 OpenSharedResource. + void OnAcceleratedPaint(PaintElementType type, Rect dirtyRect, AcceleratedPaintInfo acceleratedPaintInfo); /// /// Called when an element should be painted. Pixel values passed to this method are scaled relative to view coordinates based on the diff --git a/CefSharp/Properties/AssemblyInfo.cs b/CefSharp/Properties/AssemblyInfo.cs index b1442f465..71929861d 100644 --- a/CefSharp/Properties/AssemblyInfo.cs +++ b/CefSharp/Properties/AssemblyInfo.cs @@ -26,8 +26,8 @@ namespace CefSharp public const bool ComVisible = false; public const string AssemblyCompany = "The CefSharp Authors"; public const string AssemblyProduct = "CefSharp"; - public const string AssemblyVersion = "123.0.60"; - public const string AssemblyFileVersion = "123.0.60.0"; + public const string AssemblyVersion = "124.3.10"; + public const string AssemblyFileVersion = "124.3.10.0"; public const string AssemblyCopyright = "Copyright © 2023 The CefSharp Authors"; public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey; public const string CefSharpBrowserSubprocessProject = "CefSharp.BrowserSubprocess, PublicKey=" + PublicKey; diff --git a/NuGet/CefSharp.Common.app.config.x64.transform b/NuGet/CefSharp.Common.app.config.x64.transform index 8aa650092..22b130a47 100644 --- a/NuGet/CefSharp.Common.app.config.x64.transform +++ b/NuGet/CefSharp.Common.app.config.x64.transform @@ -20,7 +20,7 @@ - + diff --git a/NuGet/CefSharp.Common.app.config.x86.transform b/NuGet/CefSharp.Common.app.config.x86.transform index c770758e4..1c2b8c8dd 100644 --- a/NuGet/CefSharp.Common.app.config.x86.transform +++ b/NuGet/CefSharp.Common.app.config.x86.transform @@ -20,7 +20,7 @@ - + diff --git a/NuGet/PackageReference/CefSharp.Common.NETCore.targets b/NuGet/PackageReference/CefSharp.Common.NETCore.targets index 27111c08f..577cb5653 100644 --- a/NuGet/PackageReference/CefSharp.Common.NETCore.targets +++ b/NuGet/PackageReference/CefSharp.Common.NETCore.targets @@ -143,16 +143,16 @@ - - - + + + - - - + + + diff --git a/UpdateNugetPackages.ps1 b/UpdateNugetPackages.ps1 index 0d52c55c2..d39f0f90b 100644 --- a/UpdateNugetPackages.ps1 +++ b/UpdateNugetPackages.ps1 @@ -3,7 +3,7 @@ param( [Parameter(Position = 1)] - [string] $CefVersion = "123.0.6", + [string] $CefVersion = "124.3.1", [Parameter(Position = 2)] [string] $CefSharpVersion = "" ) diff --git a/appveyor.yml b/appveyor.yml index abf240f5d..30f1f6f34 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 123.0.60-CI{build} +version: 124.3.10-CI{build} clone_depth: 10 diff --git a/build.ps1 b/build.ps1 index bd4c9eb04..271372bc7 100644 --- a/build.ps1 +++ b/build.ps1 @@ -5,9 +5,9 @@ param( [Parameter(Position = 0)] [string] $Target = "vs2019", [Parameter(Position = 1)] - [string] $Version = "123.0.60", + [string] $Version = "124.3.10", [Parameter(Position = 2)] - [string] $AssemblyVersion = "123.0.60", + [string] $AssemblyVersion = "124.3.10", [Parameter(Position = 3)] [ValidateSet("NetFramework", "NetCore", "NetFramework452", "NetCore31")] [string] $TargetFramework = "NetFramework",