Merge lp:~gerboland/qtmir/qt55-compat into lp:qtmir

Proposed by Gerry Boland on 2015-04-23
Status: Merged
Approved by: Albert Astals Cid on 2015-04-23
Approved revision: 329
Merged at revision: 335
Proposed branch: lp:~gerboland/qtmir/qt55-compat
Merge into: lp:qtmir
Diff against target: 60 lines (+0/-42)
1 file modified
src/modules/Unity/Application/mirbuffersgtexture.cpp (+0/-42)
To merge this branch: bzr merge lp:~gerboland/qtmir/qt55-compat
Reviewer Review Type Date Requested Status
Timo Jyrinki (community) Approve on 2015-04-24
PS Jenkins bot continuous-integration Approve on 2015-04-23
Albert Astals Cid (community) 2015-04-23 Approve on 2015-04-23
Review via email: mp+257235@code.launchpad.net

Commit Message

Remove useless profiling information, fixes build with Qt5.5

To post a comment you must log in.
Albert Astals Cid (aacid) wrote :

* Did you perform an exploratory manual test run of the code change and any related functionality?
Builds :D

 * Did CI run pass?
Not, yet, but no reason for it not to, let's wait anyway before top approval

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/modules/Unity/Application/mirbuffersgtexture.cpp'
2--- src/modules/Unity/Application/mirbuffersgtexture.cpp 2014-11-21 12:34:01 +0000
3+++ src/modules/Unity/Application/mirbuffersgtexture.cpp 2015-04-23 10:23:32 +0000
4@@ -20,18 +20,6 @@
5 #include <mir/graphics/buffer.h>
6 #include <mir/geometry/size.h>
7
8-// QQuickProfiler uses the pretty syntax for emit, signal & slot
9-#define emit Q_EMIT
10-#define signals Q_SIGNALS
11-#define slots Q_SLOTS
12-#include <private/qquickprofiler_p.h>
13-#undef emit
14-#undef signals
15-#undef slots
16-#include <QElapsedTimer>
17-static QElapsedTimer qsg_renderer_timer;
18-static bool qsg_render_timing = !qgetenv("QSG_RENDER_TIMING").isEmpty();
19-
20 namespace mg = mir::geometry;
21
22 MirBufferSGTexture::MirBufferSGTexture(std::shared_ptr<mir::graphics::Buffer> buffer)
23@@ -88,37 +76,7 @@
24
25 void MirBufferSGTexture::bind()
26 {
27-#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
28- bool profileFrames = qsg_render_timing || QQuickProfiler::enabled;
29-#else
30- bool profileFrames = qsg_render_timing || QQuickProfiler::profilingSceneGraph();
31-#endif
32- if (profileFrames)
33- qsg_renderer_timer.start();
34-
35 glBindTexture(GL_TEXTURE_2D, m_textureId);
36 updateBindOptions(true/* force */);
37 m_mirBuffer->gl_bind_to_texture();
38-
39- qint64 bindTime = 0;
40- if (profileFrames)
41- bindTime = qsg_renderer_timer.nsecsElapsed();
42-
43- if (qsg_render_timing) {
44- printf(" - mirbuffertexture(%dx%d) bind=%d, total=%d\n",
45- m_width, m_height,
46- int(bindTime/1000000),
47- (int) qsg_renderer_timer.elapsed());
48- }
49-
50-#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
51- Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphTexturePrepare, (
52-#else
53- Q_QUICK_SG_PROFILE(QQuickProfiler::SceneGraphTexturePrepare, (
54-#endif
55- bindTime, // bind (all this does)
56- 0, // convert (not relevant)
57- 0, // swizzle (not relevant)
58- 0, // upload (not relevant)
59- 0)); // mipmap (not used ever...)
60 }

Subscribers

People subscribed via source and target branches