Remove glx_mark
glx_mark is part of the logging system now, so no need for the old functions. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
44
src/common.h
44
src/common.h
@ -24,7 +24,6 @@
|
||||
// #define DEBUG_GLX 1
|
||||
// #define DEBUG_GLX_GLSL 1
|
||||
// #define DEBUG_GLX_ERR 1
|
||||
// #define DEBUG_GLX_MARK 1
|
||||
// #define DEBUG_GLX_PAINTREG 1
|
||||
|
||||
#define MAX_ALPHA (255)
|
||||
@ -217,11 +216,6 @@ typedef GLsync (*f_ImportSyncEXT) (GLenum external_sync_type,
|
||||
GLintptr external_sync, GLbitfield flags);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_GLX_MARK
|
||||
typedef void (*f_StringMarkerGREMEDY) (GLsizei len, const void *string);
|
||||
typedef void (*f_FrameTerminatorGREMEDY) (void);
|
||||
#endif
|
||||
|
||||
/// @brief Wrapper of a binded GLX texture.
|
||||
struct _glx_texture {
|
||||
GLuint texture;
|
||||
@ -317,12 +311,6 @@ typedef struct {
|
||||
f_WaitSync glWaitSyncProc;
|
||||
/// Pointer to the glImportSyncEXT() function.
|
||||
f_ImportSyncEXT glImportSyncEXT;
|
||||
#ifdef DEBUG_GLX_MARK
|
||||
/// Pointer to StringMarkerGREMEDY function.
|
||||
f_StringMarkerGREMEDY glStringMarkerGREMEDY;
|
||||
/// Pointer to FrameTerminatorGREMEDY function.
|
||||
f_FrameTerminatorGREMEDY glFrameTerminatorGREMEDY;
|
||||
#endif
|
||||
/// Current GLX Z value.
|
||||
int z;
|
||||
/// FBConfig-s for GLX pixmap of different depths.
|
||||
@ -1011,38 +999,6 @@ vsync_deinit(session_t *ps);
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Add a OpenGL debugging marker.
|
||||
*/
|
||||
static inline void
|
||||
glx_mark_(session_t *ps, const char *func, XID xid, bool start) {
|
||||
#ifdef DEBUG_GLX_MARK
|
||||
if (glx_has_context(ps) && ps->psglx->glStringMarkerGREMEDY) {
|
||||
if (!func) func = "(unknown)";
|
||||
const char *postfix = (start ? " (start)": " (end)");
|
||||
auto str = ccalloc((strlen(func) + 12 + 2
|
||||
+ strlen(postfix) + 5), char);
|
||||
strcpy(str, func);
|
||||
sprintf(str + strlen(str), "(%#010lx)%s", xid, postfix);
|
||||
ps->psglx->glStringMarkerGREMEDY(strlen(str), str);
|
||||
free(str);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#define glx_mark(ps, xid, start) glx_mark_(ps, __func__, xid, start)
|
||||
|
||||
/**
|
||||
* Add a OpenGL debugging marker.
|
||||
*/
|
||||
static inline void
|
||||
glx_mark_frame(session_t *ps) {
|
||||
#ifdef DEBUG_GLX_MARK
|
||||
if (glx_has_context(ps) && ps->psglx->glFrameTerminatorGREMEDY)
|
||||
ps->psglx->glFrameTerminatorGREMEDY();
|
||||
#endif
|
||||
}
|
||||
|
||||
///@}
|
||||
|
||||
/** @name DBus handling
|
||||
|
Reference in New Issue
Block a user