Support to get timing from pagefilp
Handle the timing from drmEvent when page flip finished. The information can be used to optimize rendering timing. Change-Id: I14612ca48a8fea5208aa74949d7543787e860c5f Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>bb10
parent
63b8840380
commit
093a62a69a
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
#include "qeglfskmseventreader_p.h"
|
||||
#include "qeglfskmsdevice_p.h"
|
||||
#include "qeglfskmsscreen_p.h"
|
||||
#include <QSocketNotifier>
|
||||
#include <QCoreApplication>
|
||||
#include <QLoggingCategory>
|
||||
|
|
@ -50,12 +51,12 @@ Q_DECLARE_LOGGING_CATEGORY(qLcEglfsKmsDebug)
|
|||
static void pageFlipHandler(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data)
|
||||
{
|
||||
Q_UNUSED(fd);
|
||||
Q_UNUSED(sequence);
|
||||
Q_UNUSED(tv_sec);
|
||||
Q_UNUSED(tv_usec);
|
||||
|
||||
QEglFSKmsEventReaderThread *t = static_cast<QEglFSKmsEventReaderThread *>(QThread::currentThread());
|
||||
t->eventHost()->handlePageFlipCompleted(user_data);
|
||||
|
||||
QEglFSKmsScreen *screen = static_cast<QEglFSKmsScreen *>(user_data);
|
||||
screen->pageFlipped(sequence, tv_sec, tv_usec);
|
||||
}
|
||||
|
||||
class RegisterWaitFlipEvent : public QEvent
|
||||
|
|
|
|||
|
|
@ -254,4 +254,13 @@ void QEglFSKmsScreen::setPowerState(QPlatformScreen::PowerState state)
|
|||
m_powerState = state;
|
||||
}
|
||||
|
||||
/* Informs exact page flip timing which can be used rendering optimization.
|
||||
Consider this is from drm event reader thread. */
|
||||
void QEglFSKmsScreen::pageFlipped(unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec)
|
||||
{
|
||||
Q_UNUSED(sequence);
|
||||
Q_UNUSED(tv_sec);
|
||||
Q_UNUSED(tv_usec);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ public:
|
|||
bool isCursorOutOfRange() const { return m_cursorOutOfRange; }
|
||||
void setCursorOutOfRange(bool b) { m_cursorOutOfRange = b; }
|
||||
|
||||
virtual void pageFlipped(unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec);
|
||||
protected:
|
||||
QEglFSKmsDevice *m_device;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue