Skip to content

Commit

Permalink
Merge branch 'systrace' into 'mer-5.4'
Browse files Browse the repository at this point in the history
[mer] Add systrace trace points in a few crucial places. Contributes to JB#37989.

See merge request !7
  • Loading branch information
sletta committed May 5, 2017
2 parents bf670bd + 2dcb934 commit 1fee6bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/compositor/wayland_wrapper/qwlsurface.cpp
Expand Up @@ -54,6 +54,8 @@
#include <QGuiApplication>
#include <QScreen>

#include <private/qsystrace_p.h>

#include <wayland-server.h>

QT_BEGIN_NAMESPACE
Expand Down Expand Up @@ -214,6 +216,8 @@ QRegion Surface::opaqueRegion() const

void Surface::sendFrameCallback()
{
QSystraceEvent trace("graphics", "QtWL::sendFrame");

uint time = m_compositor->currentTimeMsecs();
foreach (FrameCallback *callback, m_frameCallbacks) {
if (callback->canSend) {
Expand Down Expand Up @@ -416,6 +420,7 @@ void Surface::surface_set_input_region(Resource *, struct wl_resource *region)

void Surface::surface_commit(Resource *)
{
QSystraceEvent trace("graphics", "QtWL::commit");
m_damage = m_pending.damage;

if (m_pending.buffer || m_pending.newlyAttached) {
Expand Down
3 changes: 3 additions & 0 deletions src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp
Expand Up @@ -48,6 +48,8 @@
#include <qpa/qplatformopenglcontext.h>
#endif

#include <private/qsystrace_p.h>

#include <QtCore/QDebug>

QT_BEGIN_NAMESPACE
Expand Down Expand Up @@ -158,6 +160,7 @@ bool SurfaceBuffer::isShmBuffer() const

void SurfaceBuffer::sendRelease()
{
QSystraceEvent trace("graphics", "QtWL::release");
Q_ASSERT(m_buffer);
wl_buffer_send_release(m_buffer);
}
Expand Down

0 comments on commit 1fee6bf

Please sign in to comment.