1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

Ladybird: Use only the Qt event loop to speed everything up :^)

This patch removes the dual-event-loop setup, leaving only the Qt event
loop. We teach LibWeb how to drive Qt by installing an EventLoopPlugin.

This removes the 50ms latency on all UI interactions (and network
requests, etc.)
This commit is contained in:
Andreas Kling 2022-09-07 20:33:15 +02:00 committed by Andrew Kaster
parent dcab11f5e9
commit 37d844fd66
9 changed files with 209 additions and 28 deletions

View file

@ -22,14 +22,12 @@ class WebView;
class BrowserWindow : public QMainWindow {
Q_OBJECT
public:
explicit BrowserWindow(Core::EventLoop&);
explicit BrowserWindow();
WebView& view() const { return m_current_tab->view(); }
int tab_index(Tab*);
virtual void closeEvent(QCloseEvent*) override;
public slots:
void tab_title_changed(int index, QString const&);
void tab_favicon_changed(int index, QIcon icon);
@ -44,6 +42,4 @@ private:
QTabBar* m_tabs_bar { nullptr };
NonnullOwnPtrVector<Tab> m_tabs;
Tab* m_current_tab { nullptr };
Core::EventLoop& m_event_loop;
};