mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add support for shared texture and external BeginFrame in OSR mode (issue #1006)
- Add CefWindowInfo::shared_texture_enabled and CefRenderHandler::OnAcceleratedPaint for shared texture support. Currently only supported on Windows (D3D11). - Add CefWindowInfo::external_begin_frame_enabled and CefBrowserHost::SendExternalBeginFrame for external begin frame support.
This commit is contained in:
committed by
Marshall Greenblatt
parent
09afa3a843
commit
713eebcafc
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=db89496c825cdc7fe1eaa4b7822d8492ae3a3f23$
|
||||
// $hash=3c149c932cf4ebd4b2b8c81102851ebd1d6c1d63$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/render_handler_ctocpp.h"
|
||||
@@ -204,6 +204,48 @@ void CefRenderHandlerCToCpp::OnPaint(CefRefPtr<CefBrowser> browser,
|
||||
delete[] dirtyRectsList;
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
void CefRenderHandlerCToCpp::OnAcceleratedPaint(CefRefPtr<CefBrowser> browser,
|
||||
PaintElementType type,
|
||||
const RectList& dirtyRects,
|
||||
void* shared_handle) {
|
||||
cef_render_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_accelerated_paint))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Verify param: shared_handle; type: simple_byaddr
|
||||
DCHECK(shared_handle);
|
||||
if (!shared_handle)
|
||||
return;
|
||||
|
||||
// Translate param: dirtyRects; type: simple_vec_byref_const
|
||||
const size_t dirtyRectsCount = dirtyRects.size();
|
||||
cef_rect_t* dirtyRectsList = NULL;
|
||||
if (dirtyRectsCount > 0) {
|
||||
dirtyRectsList = new cef_rect_t[dirtyRectsCount];
|
||||
DCHECK(dirtyRectsList);
|
||||
if (dirtyRectsList) {
|
||||
for (size_t i = 0; i < dirtyRectsCount; ++i) {
|
||||
dirtyRectsList[i] = dirtyRects[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Execute
|
||||
_struct->on_accelerated_paint(_struct, CefBrowserCppToC::Wrap(browser), type,
|
||||
dirtyRectsCount, dirtyRectsList, shared_handle);
|
||||
|
||||
// Restore param:dirtyRects; type: simple_vec_byref_const
|
||||
if (dirtyRectsList)
|
||||
delete[] dirtyRectsList;
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
void CefRenderHandlerCToCpp::OnCursorChange(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
|
Reference in New Issue
Block a user