Changeset View
Changeset View
Standalone View
Standalone View
composite.h
Show All 15 Lines | |||||
16 | GNU General Public License for more details. | 16 | GNU General Public License for more details. | ||
17 | 17 | | |||
18 | You should have received a copy of the GNU General Public License | 18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | *********************************************************************/ | 20 | *********************************************************************/ | ||
21 | #pragma once | 21 | #pragma once | ||
22 | 22 | | |||
23 | #include <kwinglobals.h> | 23 | #include <kwinglobals.h> | ||
24 | #include "frame_statistics.h" | ||||
24 | 25 | | |||
25 | #include <QObject> | 26 | #include <QObject> | ||
26 | #include <QElapsedTimer> | 27 | #include <QElapsedTimer> | ||
27 | #include <QTimer> | 28 | #include <QTimer> | ||
28 | #include <QBasicTimer> | 29 | #include <QBasicTimer> | ||
29 | #include <QRegion> | 30 | #include <QRegion> | ||
30 | 31 | | |||
31 | namespace KWin | 32 | namespace KWin | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 41 | public: | |||
75 | **/ | 76 | **/ | ||
76 | void aboutToSwapBuffers(); | 77 | void aboutToSwapBuffers(); | ||
77 | 78 | | |||
78 | /** | 79 | /** | ||
79 | * Notifies the compositor that a pending buffer swap has completed. | 80 | * Notifies the compositor that a pending buffer swap has completed. | ||
80 | **/ | 81 | **/ | ||
81 | void bufferSwapComplete(); | 82 | void bufferSwapComplete(); | ||
82 | 83 | | |||
84 | const FrameStatistics &frameStatistics() const { | ||||
85 | return m_frameStatistics; | ||||
86 | } | ||||
87 | | ||||
83 | /** | 88 | /** | ||
84 | * @brief Suspends the Compositor if it is currently active. | 89 | * @brief Suspends the Compositor if it is currently active. | ||
85 | * | 90 | * | ||
86 | * Note: it is possible that the Compositor is not able to suspend. Use isActive to check | 91 | * Note: it is possible that the Compositor is not able to suspend. Use isActive to check | ||
87 | * whether the Compositor has been suspended. | 92 | * whether the Compositor has been suspended. | ||
88 | * | 93 | * | ||
89 | * @return void | 94 | * @return void | ||
90 | * @see resume | 95 | * @see resume | ||
▲ Show 20 Lines • Show All 125 Lines • ▼ Show 20 Line(s) | 184 | private: | |||
216 | 221 | | |||
217 | Scene *m_scene; | 222 | Scene *m_scene; | ||
218 | 223 | | |||
219 | bool m_bufferSwapPending; | 224 | bool m_bufferSwapPending; | ||
220 | bool m_composeAtSwapCompletion; | 225 | bool m_composeAtSwapCompletion; | ||
221 | 226 | | |||
222 | int m_framesToTestForSafety = 3; | 227 | int m_framesToTestForSafety = 3; | ||
223 | QElapsedTimer m_monotonicClock; | 228 | QElapsedTimer m_monotonicClock; | ||
229 | FrameStatistics m_frameStatistics; | ||||
224 | 230 | | |||
225 | KWIN_SINGLETON_VARIABLE(Compositor, s_compositor) | 231 | KWIN_SINGLETON_VARIABLE(Compositor, s_compositor) | ||
226 | }; | 232 | }; | ||
227 | 233 | | |||
228 | } | 234 | } |