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:
Yuxuan Shui 2019-02-02 21:38:41 +00:00
parent 7d10db6531
commit eadb09ee0d
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
2 changed files with 0 additions and 49 deletions

View File

@ -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

View File

@ -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);