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:
parent
7d10db6531
commit
eadb09ee0d
44
src/common.h
44
src/common.h
|
@ -24,7 +24,6 @@
|
||||||
// #define DEBUG_GLX 1
|
// #define DEBUG_GLX 1
|
||||||
// #define DEBUG_GLX_GLSL 1
|
// #define DEBUG_GLX_GLSL 1
|
||||||
// #define DEBUG_GLX_ERR 1
|
// #define DEBUG_GLX_ERR 1
|
||||||
// #define DEBUG_GLX_MARK 1
|
|
||||||
// #define DEBUG_GLX_PAINTREG 1
|
// #define DEBUG_GLX_PAINTREG 1
|
||||||
|
|
||||||
#define MAX_ALPHA (255)
|
#define MAX_ALPHA (255)
|
||||||
|
@ -217,11 +216,6 @@ typedef GLsync (*f_ImportSyncEXT) (GLenum external_sync_type,
|
||||||
GLintptr external_sync, GLbitfield flags);
|
GLintptr external_sync, GLbitfield flags);
|
||||||
#endif
|
#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.
|
/// @brief Wrapper of a binded GLX texture.
|
||||||
struct _glx_texture {
|
struct _glx_texture {
|
||||||
GLuint texture;
|
GLuint texture;
|
||||||
|
@ -317,12 +311,6 @@ typedef struct {
|
||||||
f_WaitSync glWaitSyncProc;
|
f_WaitSync glWaitSyncProc;
|
||||||
/// Pointer to the glImportSyncEXT() function.
|
/// Pointer to the glImportSyncEXT() function.
|
||||||
f_ImportSyncEXT glImportSyncEXT;
|
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.
|
/// Current GLX Z value.
|
||||||
int z;
|
int z;
|
||||||
/// FBConfig-s for GLX pixmap of different depths.
|
/// FBConfig-s for GLX pixmap of different depths.
|
||||||
|
@ -1011,38 +999,6 @@ vsync_deinit(session_t *ps);
|
||||||
|
|
||||||
#endif
|
#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
|
/** @name DBus handling
|
||||||
|
|
|
@ -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.
|
* Paint a window itself and dim it if asked.
|
||||||
*/
|
*/
|
||||||
void paint_one(session_t *ps, win *w, const region_t *reg_paint) {
|
void paint_one(session_t *ps, win *w, const region_t *reg_paint) {
|
||||||
glx_mark(ps, w->id, true);
|
|
||||||
|
|
||||||
// Fetch Pixmap
|
// Fetch Pixmap
|
||||||
if (!w->paint.pixmap && ps->has_name_pixmap) {
|
if (!w->paint.pixmap && ps->has_name_pixmap) {
|
||||||
w->paint.pixmap = xcb_generate_id(ps->c);
|
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);
|
default: assert(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
glx_mark(ps, w->id, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern const char *background_props_str[];
|
extern const char *background_props_str[];
|
||||||
|
@ -1000,7 +996,6 @@ void paint_all(session_t *ps, win *const t, bool ignore_damage) {
|
||||||
#endif
|
#endif
|
||||||
default: assert(0);
|
default: assert(0);
|
||||||
}
|
}
|
||||||
glx_mark_frame(ps);
|
|
||||||
|
|
||||||
if (ps->o.vsync_aggressive)
|
if (ps->o.vsync_aggressive)
|
||||||
vsync_wait(ps);
|
vsync_wait(ps);
|
||||||
|
|
Loading…
Reference in New Issue