~loic.molinari/qtubuntu/requested-surface-format-fix-use-mir_connection_get_egl_pixel_format

« back to all changes in this revision

Viewing changes to tests/qmlscene_ubuntu/qmlscene_ubuntu.h

  • Committer: Gerry Boland
  • Date: 2015-10-13 12:03:39 UTC
  • mfrom: (258.3.22 qtubuntu)
  • Revision ID: gerry.boland@canonical.com-20151013120339-b60nyrofcjil7r5f
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// This file is part of QtUbuntu, a set of Qt components for Ubuntu.
2
 
// Copyright © 2013 Canonical Ltd.
3
 
//
4
 
// This program is free software: you can redistribute it and/or modify it under
5
 
// the terms of the GNU General Public License version 3, as published by the
6
 
// Free Software Foundation.
7
 
//
8
 
// This program is distributed in the hope that it will be useful, but WITHOUT
9
 
// ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10
 
// SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11
 
// General Public License for more details.
12
 
//
13
 
// You should have received a copy of the GNU General Public License along with
14
 
// this program.  If not, see <http://www.gnu.org/licenses/>.
15
 
 
16
 
#include <QObject>
17
 
 
18
 
class Scene : public QObject {
19
 
  Q_OBJECT
20
 
 
21
 
 public:
22
 
  Scene(QObject* parent = 0);
23
 
  void getStats(int* frames, double* min, double* max, double* average);
24
 
 
25
 
 private slots:
26
 
  void beforeRendering();
27
 
  void afterRendering();
28
 
 
29
 
 private:
30
 
  struct timespec t1_;
31
 
  struct timespec t2_;
32
 
  qint64 frames_;
33
 
  double sum_;
34
 
  double min_;
35
 
  double max_;
36
 
};