diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2012-05-04 13:10:41 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-08 22:30:10 +0200 |
commit | f280efc6201adf8933c9d48a1d5b6983ee9fed9b (patch) | |
tree | 8ec0d8466b951272667d6c620959d51383902630 /src/plugins/platforms/xcb/qxcbscreen.h | |
parent | 4a58853aeae02677e6ee1a0f0ef8839578c32573 (diff) |
Added QScreen::refreshRate() to get the vertical refresh rate.
To give applications that want it the option to use a fixed timestep for
animations, and to avoid having values of 60 hard-coded (we have a
couple of those in qtdeclarative/src/quick already), we need to know the
refresh rates of the screens we are rendering to.
Change-Id: Ife49162e830440ad7eab563a27e8aebbbafc5fc5
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbscreen.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbscreen.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h index ba3f4aff8d..7a81d8b43a 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.h +++ b/src/plugins/platforms/xcb/qxcbscreen.h @@ -69,6 +69,7 @@ public: QImage::Format format() const; QSizeF physicalSize() const; QPlatformCursor *cursor() const; + qreal refreshRate() const; int screenNumber() const; @@ -84,6 +85,8 @@ public: QString name() const; + void updateRefreshRate(); + private: xcb_screen_t *m_screen; int m_number; @@ -92,6 +95,7 @@ private: xcb_window_t m_clientLeader; QMap<xcb_visualid_t, xcb_visualtype_t> m_visuals; QXcbCursor *m_cursor; + int m_refreshRate; }; QT_END_NAMESPACE |