mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add a new CefBrowserHost::SetWindowlessFrameRate method to support
dynamic configuration of the windowless frame rate (issue #1629).
This commit is contained in:
@@ -505,6 +505,26 @@ typedef struct _cef_browser_host_t {
|
||||
void (CEF_CALLBACK *notify_move_or_resize_started)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Returns the maximum rate in frames per second (fps) that
|
||||
// cef_render_handler_t:: OnPaint will be called for a windowless browser. The
|
||||
// actual fps may be lower if the browser cannot generate frames at the
|
||||
// requested rate. The minimum value is 1 and the maximum value is 60 (default
|
||||
// 30). This function can only be called on the UI thread.
|
||||
///
|
||||
int (CEF_CALLBACK *get_windowless_frame_rate)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Set the maximum rate in frames per second (fps) that cef_render_handler_t::
|
||||
// OnPaint will be called for a windowless browser. The actual fps may be
|
||||
// lower if the browser cannot generate frames at the requested rate. The
|
||||
// minimum value is 1 and the maximum value is 60 (default 30). Can also be
|
||||
// set at browser creation via cef_browser_tSettings.windowless_frame_rate.
|
||||
///
|
||||
void (CEF_CALLBACK *set_windowless_frame_rate)(
|
||||
struct _cef_browser_host_t* self, int frame_rate);
|
||||
|
||||
///
|
||||
// Get the NSTextInputContext implementation for enabling IME on Mac when
|
||||
// window rendering is disabled.
|
||||
|
@@ -555,6 +555,26 @@ class CefBrowserHost : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual void NotifyMoveOrResizeStarted() =0;
|
||||
|
||||
///
|
||||
// Returns the maximum rate in frames per second (fps) that CefRenderHandler::
|
||||
// OnPaint will be called for a windowless browser. The actual fps may be
|
||||
// lower if the browser cannot generate frames at the requested rate. The
|
||||
// minimum value is 1 and the maximum value is 60 (default 30). This method
|
||||
// can only be called on the UI thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int GetWindowlessFrameRate() =0;
|
||||
|
||||
///
|
||||
// Set the maximum rate in frames per second (fps) that CefRenderHandler::
|
||||
// OnPaint will be called for a windowless browser. The actual fps may be
|
||||
// lower if the browser cannot generate frames at the requested rate. The
|
||||
// minimum value is 1 and the maximum value is 60 (default 30). Can also be
|
||||
// set at browser creation via CefBrowserSettings.windowless_frame_rate.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetWindowlessFrameRate(int frame_rate) =0;
|
||||
|
||||
///
|
||||
// Get the NSTextInputContext implementation for enabling IME on Mac when
|
||||
// window rendering is disabled.
|
||||
|
@@ -477,7 +477,8 @@ typedef struct _cef_browser_settings_t {
|
||||
// The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint
|
||||
// will be called for a windowless browser. The actual fps may be lower if
|
||||
// the browser cannot generate frames at the requested rate. The minimum
|
||||
// value is 1 and the maximum value is 60 (default 30).
|
||||
// value is 1 and the maximum value is 60 (default 30). This value can also be
|
||||
// changed dynamically via CefBrowserHost::SetWindowlessFrameRate.
|
||||
///
|
||||
int windowless_frame_rate;
|
||||
|
||||
|
Reference in New Issue
Block a user