mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 00:49:46 +00:00
UI/Qt: Set WC's max FPS to the refresh rate of the current screen
This commit is contained in:
parent
b0d97c991f
commit
124bdce99c
Notes:
github-actions[bot]
2025-07-26 14:10:29 +00:00
Author: https://github.com/Lubrsi
Commit: 124bdce99c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5606
Reviewed-by: https://github.com/Psychpsyo
Reviewed-by: https://github.com/kalenikaliaksandr
5 changed files with 40 additions and 4 deletions
|
|
@ -43,12 +43,16 @@ namespace Ladybird {
|
|||
|
||||
class Tab;
|
||||
|
||||
struct WebContentViewInitialState {
|
||||
double maximum_frames_per_second { 60.0 };
|
||||
};
|
||||
|
||||
class WebContentView final
|
||||
: public QWidget
|
||||
, public WebView::ViewImplementation {
|
||||
Q_OBJECT
|
||||
public:
|
||||
WebContentView(QWidget* window, RefPtr<WebView::WebContentClient> parent_client = nullptr, size_t page_index = 0);
|
||||
WebContentView(QWidget* window, RefPtr<WebView::WebContentClient> parent_client = nullptr, size_t page_index = 0, WebContentViewInitialState initial_state = {});
|
||||
virtual ~WebContentView() override;
|
||||
|
||||
Function<String(const URL::URL&, Web::HTML::ActivateTab)> on_tab_open_request;
|
||||
|
|
@ -76,6 +80,7 @@ public:
|
|||
|
||||
void set_viewport_rect(Gfx::IntRect);
|
||||
void set_device_pixel_ratio(double);
|
||||
void set_maximum_frames_per_second(double);
|
||||
|
||||
enum class PaletteMode {
|
||||
Default,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue