diff --git a/src/opengl/CMakeLists.txt b/src/opengl/CMakeLists.txt index 8aec1c685b..3f5e34e9d0 100644 --- a/src/opengl/CMakeLists.txt +++ b/src/opengl/CMakeLists.txt @@ -105,8 +105,12 @@ qt_internal_extend_target(OpenGL CONDITION QT_FEATURE_egl qopenglcompositorbackingstore.cpp qopenglcompositorbackingstore_p.h ) - -qt_internal_create_tracepoints(OpenGL qtopengl.tracepoints) +qt_internal_generate_tracepoints(OpenGL opengl + SOURCES + qopenglframebufferobject.cpp + qopenglpaintengine.cpp + qopengltexturecache.cpp +) qt_internal_add_docs(OpenGL doc/qtopengl.qdocconf ) diff --git a/src/opengl/qopenglframebufferobject.cpp b/src/opengl/qopenglframebufferobject.cpp index 64b07e661f..ccb4f7b0a8 100644 --- a/src/opengl/qopenglframebufferobject.cpp +++ b/src/opengl/qopenglframebufferobject.cpp @@ -18,6 +18,15 @@ QT_BEGIN_NAMESPACE +Q_TRACE_PREFIX(qtopengl, + "#include " \ + "#include " \ + "#include " +); +Q_TRACE_PARAM_REPLACE(GLenum, int); +Q_TRACE_PARAM_REPLACE(GLint, int); +Q_TRACE_METADATA(qtopengl, "ENUM { } QOpenGLFramebufferObject::Attachment; "); + #ifndef QT_NO_DEBUG #define QT_RESET_GLERROR() \ { \ @@ -452,10 +461,11 @@ namespace } } -void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *qfbo, const QSize &size, - QOpenGLFramebufferObject::Attachment attachment, - GLenum texture_target, GLenum internal_format, - GLint samples, bool mipmap) +void Q_TRACE_INSTRUMENT(qtopengl) QOpenGLFramebufferObjectPrivate::init( + QOpenGLFramebufferObject *qfbo, const QSize &size, + QOpenGLFramebufferObject::Attachment attachment, + GLenum texture_target, GLenum internal_format, + GLint samples, bool mipmap) { Q_TRACE_SCOPE(QOpenGLFramebufferObjectPrivate_init, qfbo, size, attachment, texture_target, internal_format, samples, mipmap); Q_UNUSED(qfbo); diff --git a/src/opengl/qopenglpaintengine.cpp b/src/opengl/qopenglpaintengine.cpp index 8cdf08bdef..062eaa6a53 100644 --- a/src/opengl/qopenglpaintengine.cpp +++ b/src/opengl/qopenglpaintengine.cpp @@ -606,18 +606,10 @@ static inline void setCoords(GLfloat *coords, const QOpenGLRect &rect) coords[7] = rect.bottom; } -void QOpenGL2PaintEngineExPrivate::drawTexture(const QOpenGLRect& dest, const QOpenGLRect& src, const QSize &textureSize, bool opaque, bool pattern) +void Q_TRACE_INSTRUMENT(qtopengl) QOpenGL2PaintEngineExPrivate::drawTexture(const QOpenGLRect& dest, const QOpenGLRect& src, const QSize &textureSize, bool opaque, bool pattern) { - Q_TRACE_SCOPE(QOpenGL2PaintEngineExPrivate_drawTexture, - dest.left, - dest.top, - dest.right, - dest.bottom, - src.left, - src.top, - src.right, - src.bottom, - textureSize, opaque); + Q_TRACE_PARAM_REPLACE(QOpenGLRect, QRectF); + Q_TRACE_SCOPE(QOpenGL2PaintEngineExPrivate_drawTexture, dest, src, textureSize, opaque, pattern); // Setup for texture drawing currentBrush = noBrush; diff --git a/src/opengl/qopengltexturecache.cpp b/src/opengl/qopengltexturecache.cpp index 6d706325a5..107380ff08 100644 --- a/src/opengl/qopengltexturecache.cpp +++ b/src/opengl/qopengltexturecache.cpp @@ -121,6 +121,9 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QImage &i return id; } +Q_TRACE_POINT(qtopengl, QOpenGLTextureCache_bindTexture_entry, QOpenGLContext *context, qint64 key, const unsigned char *image, int options); +Q_TRACE_POINT(qtopengl, QOpenGLTextureCache_bindTexture_exit); + GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, qint64 key, const QImage &image, QOpenGLTextureUploader::BindOptions options) { Q_TRACE_SCOPE(QOpenGLTextureCache_bindTexture, context, key, image.bits(), options);