mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add support for begin frame scheduling and direct rendering when GPU compositing is disabled (issue #1368).
- Always set the browser process VSync rate (frame rate) to CefSettings.windowless_frame_rate. - When the `enable-begin-frame-scheduling` command-line flag is specified the VSync rate for all processes will be synchronized to CefSettings.windowless_frame_rate. This flag cannot be used in combination with windowed rendering. - When the `disable-gpu` and `disable-gpu-compositing` command-line flags are specified the CefRenderHandler::OnPaint method will be called directly from the compositor instead of requiring an additional copy for each frame. - CefRenderHandler::OnPopupSize now passes view coordinates instead of (potentially scaled) pixel coordinates. - Add OSR unit tests for 2x (HiDPI) pixel scaling. - Improve CefRenderHandler documentation. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1960 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -105,18 +105,21 @@ class CefRenderHandler : public virtual CefBase {
|
||||
|
||||
///
|
||||
// Called when the browser wants to move or resize the popup widget. |rect|
|
||||
// contains the new location and size.
|
||||
// contains the new location and size in view coordinates.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPopupSize(CefRefPtr<CefBrowser> browser,
|
||||
const CefRect& rect) {}
|
||||
|
||||
///
|
||||
// Called when an element should be painted. |type| indicates whether the
|
||||
// element is the view or the popup widget. |buffer| contains the pixel data
|
||||
// for the whole image. |dirtyRects| contains the set of rectangles that need
|
||||
// to be repainted. |buffer| will be |width|*|height|*4 bytes in size and
|
||||
// represents a BGRA image with an upper-left origin.
|
||||
// Called when an element should be painted. Pixel values passed to this
|
||||
// method are scaled relative to view coordinates based on the value of
|
||||
// CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type|
|
||||
// indicates whether the element is the view or the popup widget. |buffer|
|
||||
// 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.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPaint(CefRefPtr<CefBrowser> browser,
|
||||
@ -138,6 +141,7 @@ class CefRenderHandler : public virtual CefBase {
|
||||
///
|
||||
// Called when the user starts dragging content in the web view. Contextual
|
||||
// information about the dragged content is supplied by |drag_data|.
|
||||
// (|x|, |y|) is the drag start location in screen coordinates.
|
||||
// OS APIs that run a system message loop may be used within the
|
||||
// StartDragging call.
|
||||
//
|
||||
|
Reference in New Issue
Block a user