Skip to content

Commit

Permalink
Merge fdfd7a2 into 0fff657
Browse files Browse the repository at this point in the history
  • Loading branch information
Scalibq committed May 7, 2024
2 parents 0fff657 + fdfd7a2 commit ce86583
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CefSharp.Core.Runtime/Internals/RenderClientAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ namespace CefSharp
virtual DECL void OnAcceleratedPaint(CefRefPtr<CefBrowser> 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), nullptr);
AcceleratedPaintInfo^ api = gcnew AcceleratedPaintInfo();
api->SharedTextureHandle = (IntPtr)info.shared_texture_handle;
api->Format = (ColorType)info.format;
_renderWebBrowser->OnAcceleratedPaint((CefSharp::PaintElementType)type, CefSharp::Structs::Rect(r.x, r.y, r.width, r.height), api);
}

virtual DECL void OnPaint(CefRefPtr<CefBrowser> browser, PaintElementType type, const RectList& dirtyRects,
Expand Down
5 changes: 5 additions & 0 deletions CefSharp/AcceleratedPaintInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

using System;
using CefSharp.Enums;

namespace CefSharp
{
/// <summary>
/// AcceleratedPaintInfo
/// </summary>
public sealed class AcceleratedPaintInfo
{
public IntPtr SharedTextureHandle;
public ColorType Format;
}
}

0 comments on commit ce86583

Please sign in to comment.