diff options
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/opengl/opengl.pro | 3 | ||||
-rw-r--r-- | src/opengl/qopenglframebufferobject.cpp | 7 | ||||
-rw-r--r-- | src/opengl/qopenglpaintengine.cpp | 4 | ||||
-rw-r--r-- | src/opengl/qopengltexturecache.cpp | 4 | ||||
-rw-r--r-- | src/opengl/qtopengl.tracepoints | 3 |
6 files changed, 23 insertions, 1 deletions
diff --git a/src/opengl/CMakeLists.txt b/src/opengl/CMakeLists.txt index 7fac433205..1d8544ab8e 100644 --- a/src/opengl/CMakeLists.txt +++ b/src/opengl/CMakeLists.txt @@ -98,6 +98,9 @@ qt_extend_target(OpenGL CONDITION QT_FEATURE_egl qopenglcompositor.cpp qopenglcompositor_p.h qopenglcompositorbackingstore.cpp qopenglcompositorbackingstore_p.h ) + + +qt_create_tracepoints(OpenGL qtopengl.tracepoints) qt_add_docs(OpenGL doc/qtopengl.qdocconf ) diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index f190616ca8..0dd3d33552 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -152,3 +152,6 @@ qtConfig(egl) { } load(qt_module) + +TRACEPOINT_PROVIDER = $$PWD/qtopengl.tracepoints +CONFIG += qt_tracepoints diff --git a/src/opengl/qopenglframebufferobject.cpp b/src/opengl/qopenglframebufferobject.cpp index ba18647387..813c01b0a5 100644 --- a/src/opengl/qopenglframebufferobject.cpp +++ b/src/opengl/qopenglframebufferobject.cpp @@ -50,6 +50,8 @@ #include <qimage.h> #include <QtCore/qbytearray.h> +#include <qtopengl_tracepoints_p.h> + QT_BEGIN_NAMESPACE #ifndef QT_NO_DEBUG @@ -467,11 +469,14 @@ namespace } } -void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSize &size, +void 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); + QOpenGLContext *ctx = QOpenGLContext::currentContext(); funcs.initializeOpenGLFunctions(); diff --git a/src/opengl/qopenglpaintengine.cpp b/src/opengl/qopenglpaintengine.cpp index d1e8cabf28..51d2a48682 100644 --- a/src/opengl/qopenglpaintengine.cpp +++ b/src/opengl/qopenglpaintengine.cpp @@ -87,6 +87,8 @@ #include <QDebug> +#include <qtopengl_tracepoints_p.h> + #ifndef GL_KHR_blend_equation_advanced #define GL_KHR_blend_equation_advanced 1 #define GL_MULTIPLY_KHR 0x9294 @@ -635,6 +637,8 @@ static inline void setCoords(GLfloat *coords, const QOpenGLRect &rect) void QOpenGL2PaintEngineExPrivate::drawTexture(const QOpenGLRect& dest, const QOpenGLRect& src, const QSize &textureSize, bool opaque, bool pattern) { + 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 5256c429e0..a58570dbc4 100644 --- a/src/opengl/qopengltexturecache.cpp +++ b/src/opengl/qopengltexturecache.cpp @@ -44,6 +44,8 @@ #include <private/qimagepixmapcleanuphooks_p.h> #include <qpa/qplatformpixmap.h> +#include <qtopengl_tracepoints_p.h> + QT_BEGIN_NAMESPACE class QOpenGLTextureCacheWrapper @@ -157,6 +159,8 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QImage &i GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, qint64 key, const QImage &image, QOpenGLTextureUploader::BindOptions options) { + Q_TRACE_SCOPE(QOpenGLTextureCache_bindTexture, context, key, image, options); + GLuint id; QOpenGLFunctions *funcs = context->functions(); funcs->glGenTextures(1, &id); diff --git a/src/opengl/qtopengl.tracepoints b/src/opengl/qtopengl.tracepoints new file mode 100644 index 0000000000..3c3043d3d4 --- /dev/null +++ b/src/opengl/qtopengl.tracepoints @@ -0,0 +1,3 @@ +QOpenGLFramebufferObjectPrivate_init(QOpenGLFramebufferObject *qfbo, const QSize &size, QOpenGLFramebufferObject::Attachment attachment, GLenum texture_target, GLenum internal_format, GLint samples, bool mipmap) +QOpenGL2PaintEngineExPrivate_drawTexture(const QOpenGLRect& dest, const QOpenGLRect& src, const QSize &textureSize, bool opaque, bool pattern) +QOpenGLTextureCache_bindTexture(QOpenGLContext *context, qint64 key, const QImage &image, QOpenGLTextureUploader::BindOptions options) |