From eadb09ee0d048bfdbfbe5fdb88e7088ed5e1e1b9 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 2 Feb 2019 21:38:41 +0000 Subject: [PATCH] Remove glx_mark glx_mark is part of the logging system now, so no need for the old functions. Signed-off-by: Yuxuan Shui --- src/common.h | 44 -------------------------------------------- src/render.c | 5 ----- 2 files changed, 49 deletions(-) diff --git a/src/common.h b/src/common.h index cfb5977..b6d29d1 100644 --- a/src/common.h +++ b/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 diff --git a/src/render.c b/src/render.c index b604edb..e2d20fc 100644 --- a/src/render.c +++ b/src/render.c @@ -194,8 +194,6 @@ static inline bool paint_isvalid(session_t *ps, const paint_t *ppaint) { * Paint a window itself and dim it if asked. */ void paint_one(session_t *ps, win *w, const region_t *reg_paint) { - glx_mark(ps, w->id, true); - // Fetch Pixmap if (!w->paint.pixmap && ps->has_name_pixmap) { w->paint.pixmap = xcb_generate_id(ps->c); @@ -378,8 +376,6 @@ void paint_one(session_t *ps, win *w, const region_t *reg_paint) { default: assert(false); } } - - glx_mark(ps, w->id, false); } extern const char *background_props_str[]; @@ -1000,7 +996,6 @@ void paint_all(session_t *ps, win *const t, bool ignore_damage) { #endif default: assert(0); } - glx_mark_frame(ps); if (ps->o.vsync_aggressive) vsync_wait(ps);