@@ -69,7 +69,8 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
69
69
70
70
// /
71
71
// 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.
73
74
// /
74
75
/* --cef()--*/
75
76
virtual bool GetRootScreenRect (CefRefPtr<CefBrowser> browser, CefRect& rect) {
@@ -78,10 +79,10 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
78
79
79
80
// /
80
81
// 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 .
82
83
// /
83
84
/* --cef()--*/
84
- virtual bool GetViewRect (CefRefPtr<CefBrowser> browser, CefRect& rect) = 0;
85
+ virtual void GetViewRect (CefRefPtr<CefBrowser> browser, CefRect& rect) = 0;
85
86
86
87
// /
87
88
// Called to retrieve the translation from view coordinates to actual screen
@@ -134,7 +135,8 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
134
135
// contains the pixel data for the whole image. |dirtyRects| contains the set
135
136
// of rectangles in pixel coordinates that need to be repainted. |buffer| will
136
137
// 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.
138
140
// /
139
141
/* --cef()--*/
140
142
virtual void OnPaint (CefRefPtr<CefBrowser> browser,
@@ -144,6 +146,21 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
144
146
int width,
145
147
int height) = 0;
146
148
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
+
147
164
// /
148
165
// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
149
166
// |custom_cursor_info| will be populated with the custom cursor information.
0 commit comments