Trace: Convert qtopengl module to use tracepointgen tool
Pick-to: 6.5 Change-Id: I441455a4d49a559fb591ea5c8cffb97af66fb2b1 Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
This commit is contained in:
parent
4ce1c1d932
commit
4d359e2bec
@ -105,8 +105,12 @@ qt_internal_extend_target(OpenGL CONDITION QT_FEATURE_egl
|
|||||||
qopenglcompositorbackingstore.cpp qopenglcompositorbackingstore_p.h
|
qopenglcompositorbackingstore.cpp qopenglcompositorbackingstore_p.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
qt_internal_generate_tracepoints(OpenGL opengl
|
||||||
qt_internal_create_tracepoints(OpenGL qtopengl.tracepoints)
|
SOURCES
|
||||||
|
qopenglframebufferobject.cpp
|
||||||
|
qopenglpaintengine.cpp
|
||||||
|
qopengltexturecache.cpp
|
||||||
|
)
|
||||||
qt_internal_add_docs(OpenGL
|
qt_internal_add_docs(OpenGL
|
||||||
doc/qtopengl.qdocconf
|
doc/qtopengl.qdocconf
|
||||||
)
|
)
|
||||||
|
@ -18,6 +18,15 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
Q_TRACE_PREFIX(qtopengl,
|
||||||
|
"#include <private/qopengl2pexvertexarray_p.h>" \
|
||||||
|
"#include <private/qopengltextureuploader_p.h>" \
|
||||||
|
"#include <qopenglframebufferobject.h>"
|
||||||
|
);
|
||||||
|
Q_TRACE_PARAM_REPLACE(GLenum, int);
|
||||||
|
Q_TRACE_PARAM_REPLACE(GLint, int);
|
||||||
|
Q_TRACE_METADATA(qtopengl, "ENUM { } QOpenGLFramebufferObject::Attachment; ");
|
||||||
|
|
||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
#define QT_RESET_GLERROR() \
|
#define QT_RESET_GLERROR() \
|
||||||
{ \
|
{ \
|
||||||
@ -452,10 +461,11 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *qfbo, const QSize &size,
|
void Q_TRACE_INSTRUMENT(qtopengl) QOpenGLFramebufferObjectPrivate::init(
|
||||||
QOpenGLFramebufferObject::Attachment attachment,
|
QOpenGLFramebufferObject *qfbo, const QSize &size,
|
||||||
GLenum texture_target, GLenum internal_format,
|
QOpenGLFramebufferObject::Attachment attachment,
|
||||||
GLint samples, bool mipmap)
|
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_TRACE_SCOPE(QOpenGLFramebufferObjectPrivate_init, qfbo, size, attachment, texture_target, internal_format, samples, mipmap);
|
||||||
Q_UNUSED(qfbo);
|
Q_UNUSED(qfbo);
|
||||||
|
@ -606,18 +606,10 @@ static inline void setCoords(GLfloat *coords, const QOpenGLRect &rect)
|
|||||||
coords[7] = rect.bottom;
|
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,
|
Q_TRACE_PARAM_REPLACE(QOpenGLRect, QRectF);
|
||||||
dest.left,
|
Q_TRACE_SCOPE(QOpenGL2PaintEngineExPrivate_drawTexture, dest, src, textureSize, opaque, pattern);
|
||||||
dest.top,
|
|
||||||
dest.right,
|
|
||||||
dest.bottom,
|
|
||||||
src.left,
|
|
||||||
src.top,
|
|
||||||
src.right,
|
|
||||||
src.bottom,
|
|
||||||
textureSize, opaque);
|
|
||||||
|
|
||||||
// Setup for texture drawing
|
// Setup for texture drawing
|
||||||
currentBrush = noBrush;
|
currentBrush = noBrush;
|
||||||
|
@ -121,6 +121,9 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QImage &i
|
|||||||
return id;
|
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)
|
GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, qint64 key, const QImage &image, QOpenGLTextureUploader::BindOptions options)
|
||||||
{
|
{
|
||||||
Q_TRACE_SCOPE(QOpenGLTextureCache_bindTexture, context, key, image.bits(), options);
|
Q_TRACE_SCOPE(QOpenGLTextureCache_bindTexture, context, key, image.bits(), options);
|
||||||
|
Loading…
Reference in New Issue
Block a user