mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:27:35 +00:00
Magnifier: Use a GUI::DisplayLink to drive the screen captures
This ensures that we don't try to update more often than the screen is updated. It also avoids doing synchronous IPC in paint_event().
This commit is contained in:
parent
61c56e75f4
commit
0ea1fd2d54
3 changed files with 13 additions and 8 deletions
|
@ -19,10 +19,12 @@ public:
|
|||
void track_cursor_globally();
|
||||
|
||||
private:
|
||||
virtual void timer_event(Core::TimerEvent&) override;
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
|
||||
void sync();
|
||||
|
||||
Gfx::IntPoint m_mouse_position;
|
||||
int m_scale_factor { 2 };
|
||||
int m_desktop_display_scale { 1 };
|
||||
RefPtr<Gfx::Bitmap> m_grabbed_bitmap;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue