mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Optimized video frame pushing.
This commit is contained in:
@@ -500,8 +500,16 @@ bool Sandbox::notify(QObject *receiver, QEvent *e) {
|
||||
|
||||
const auto wrap = createEventNestingLevel();
|
||||
const auto type = e->type();
|
||||
if ((type == QEvent::UpdateRequest) && _application) {
|
||||
_application->animationManager().update();
|
||||
if (type == QEvent::UpdateRequest) {
|
||||
_widgetUpdateRequests.fire({});
|
||||
// Profiling.
|
||||
//const auto time = crl::now();
|
||||
//LOG(("[%1] UPDATE STARTED").arg(time));
|
||||
//const auto guard = gsl::finally([&] {
|
||||
// const auto now = crl::now();
|
||||
// LOG(("[%1] UPDATE FINISHED (%2)").arg(now).arg(now - time));
|
||||
//});
|
||||
//return QApplication::notify(receiver, e);
|
||||
}
|
||||
return QApplication::notify(receiver, e);
|
||||
}
|
||||
@@ -550,6 +558,10 @@ void Sandbox::resumeDelayedWindowActivations() {
|
||||
_delayedActivationsPaused = false;
|
||||
}
|
||||
|
||||
rpl::producer<> Sandbox::widgetUpdateRequests() const {
|
||||
return _widgetUpdateRequests.events();
|
||||
}
|
||||
|
||||
ProxyData Sandbox::sandboxProxy() const {
|
||||
return _sandboxProxy;
|
||||
}
|
||||
|
@@ -39,6 +39,8 @@ public:
|
||||
void pauseDelayedWindowActivations();
|
||||
void resumeDelayedWindowActivations();
|
||||
|
||||
rpl::producer<> widgetUpdateRequests() const;
|
||||
|
||||
ProxyData sandboxProxy() const;
|
||||
|
||||
static Sandbox &Instance() {
|
||||
@@ -109,6 +111,8 @@ private:
|
||||
QByteArray _lastCrashDump;
|
||||
ProxyData _sandboxProxy;
|
||||
|
||||
rpl::event_stream<> _widgetUpdateRequests;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
Reference in New Issue
Block a user