@@ -69,7 +69,8 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
6969
7070 // /
7171 // Called to retrieve the root window rectangle in screen coordinates. Return
72- // true if the rectangle was provided.
72+ // true if the rectangle was provided. If this method returns false the
73+ // rectangle from GetViewRect will be used.
7374 // /
7475 /* --cef()--*/
7576 virtual bool GetRootScreenRect (CefRefPtr<CefBrowser> browser, CefRect& rect) {
@@ -78,10 +79,10 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
7879
7980 // /
8081 // Called to retrieve the view rectangle which is relative to screen
81- // coordinates. Return true if the rectangle was provided .
82+ // coordinates. This method must always provide a non-empty rectangle .
8283 // /
8384 /* --cef()--*/
84- virtual bool GetViewRect (CefRefPtr<CefBrowser> browser, CefRect& rect) = 0;
85+ virtual void GetViewRect (CefRefPtr<CefBrowser> browser, CefRect& rect) = 0;
8586
8687 // /
8788 // Called to retrieve the translation from view coordinates to actual screen
@@ -134,7 +135,8 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
134135 // contains the pixel data for the whole image. |dirtyRects| contains the set
135136 // of rectangles in pixel coordinates that need to be repainted. |buffer| will
136137 // be |width|*|height|*4 bytes in size and represents a BGRA image with an
137- // upper-left origin.
138+ // upper-left origin. This method is only called when
139+ // CefWindowInfo::shared_texture_enabled is set to false.
138140 // /
139141 /* --cef()--*/
140142 virtual void OnPaint (CefRefPtr<CefBrowser> browser,
@@ -144,6 +146,21 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
144146 int width,
145147 int height) = 0;
146148
149+ // /
150+ // Called when an element has been rendered to the shared texture handle.
151+ // |type| indicates whether the element is the view or the popup widget.
152+ // |dirtyRects| contains the set of rectangles in pixel coordinates that need
153+ // to be repainted. |shared_handle| is the handle for a D3D11 Texture2D that
154+ // can be accessed via ID3D11Device using the OpenSharedResource method. This
155+ // method is only called when CefWindowInfo::shared_texture_enabled is set to
156+ // true, and is currently only supported on Windows.
157+ // /
158+ /* --cef()--*/
159+ virtual void OnAcceleratedPaint (CefRefPtr<CefBrowser> browser,
160+ PaintElementType type,
161+ const RectList& dirtyRects,
162+ void * shared_handle) {}
163+
147164 // /
148165 // Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
149166 // |custom_cursor_info| will be populated with the custom cursor information.
0 commit comments