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
@ -135,7 +135,8 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
|
||||
// contains the pixel data for the whole image. |dirtyRects| contains the set
|
||||
// of rectangles in pixel coordinates that need to be repainted. |buffer| will
|
||||
// be |width|*|height|*4 bytes in size and represents a BGRA image with an
|
||||
// upper-left origin.
|
||||
// upper-left origin. This method is only called when
|
||||
// CefWindowInfo::shared_texture_enabled is set to false.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPaint(CefRefPtr<CefBrowser> browser,
|
||||
@ -145,6 +146,21 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
|
||||
int width,
|
||||
int height) = 0;
|
||||
|
||||
///
|
||||
// Called when an element has been rendered to the shared texture handle.
|
||||
// |type| indicates whether the element is the view or the popup widget.
|
||||
// |dirtyRects| contains the set of rectangles in pixel coordinates that need
|
||||
// to be repainted. |shared_handle| is the handle for a D3D11 Texture2D that
|
||||
// can be accessed via ID3D11Device using the OpenSharedResource method. This
|
||||
// method is only called when CefWindowInfo::shared_texture_enabled is set to
|
||||
// true, and is currently only supported on Windows.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnAcceleratedPaint(CefRefPtr<CefBrowser> browser,
|
||||
PaintElementType type,
|
||||
const RectList& dirtyRects,
|
||||
void* shared_handle) {}
|
||||
|
||||
///
|
||||
// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
|
||||
// |custom_cursor_info| will be populated with the custom cursor information.
|
||||
|
Reference in New Issue
Block a user