LibWebView+WebContent: Make it possible to change the painting interval

This allows us to paint at the refresh rate of the screen. The default
is 60, as before, in case it never gets set by anything.
This commit is contained in:
Luke Wilde
2025-07-25 13:10:00 +01:00
committed by Alexander Kalenik
parent 31faf31f6a
commit c93c30d596
Notes: github-actions[bot] 2025-07-26 14:10:40 +00:00
7 changed files with 31 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ public:
void reset_zoom();
float zoom_level() const { return m_zoom_level; }
float device_pixel_ratio() const { return m_device_pixel_ratio; }
double maximum_frames_per_second() const { return m_maximum_frames_per_second; }
void enqueue_input_event(Web::InputEvent);
void did_finish_handling_input_event(Badge<WebContentClient>, Web::EventResult event_result);
@@ -288,6 +289,7 @@ protected:
float m_zoom_level { 1.0 };
float m_device_pixel_ratio { 1.0 };
double m_maximum_frames_per_second { 60.0 };
Queue<Web::InputEvent> m_pending_input_events;