diff options
Diffstat (limited to 'compton.h')
-rw-r--r-- | compton.h | 27 |
1 files changed, 22 insertions, 5 deletions
@@ -675,20 +675,37 @@ static win * paint_preprocess(session_t *ps, win *list); static void -render(session_t *ps, int x, int y, int dx, int dy, int wid, int hei, +render_(session_t *ps, int x, int y, int dx, int dy, int wid, int hei, double opacity, bool argb, bool neg, Picture pict, glx_texture_t *ptex, - XserverRegion reg_paint, const reg_data_t *pcache_reg); + XserverRegion reg_paint, const reg_data_t *pcache_reg +#ifdef CONFIG_VSYNC_OPENGL_GLSL + , const glx_prog_main_t *pprogram +#endif + ); + +#ifdef CONFIG_VSYNC_OPENGL_GLSL +#define \ + render(ps, x, y, dx, dy, wid, hei, opacity, argb, neg, pict, ptex, reg_paint, pcache_reg, pprogram) \ + render_(ps, x, y, dx, dy, wid, hei, opacity, argb, neg, pict, ptex, reg_paint, pcache_reg, pprogram) +#else +#define \ + render(ps, x, y, dx, dy, wid, hei, opacity, argb, neg, pict, ptex, reg_paint, pcache_reg, pprogram) \ + render_(ps, x, y, dx, dy, wid, hei, opacity, argb, neg, pict, ptex, reg_paint, pcache_reg) +#endif static inline void -win_render(session_t *ps, win *w, int x, int y, int wid, int hei, double opacity, XserverRegion reg_paint, const reg_data_t *pcache_reg, Picture pict) { +win_render(session_t *ps, win *w, int x, int y, int wid, int hei, + double opacity, XserverRegion reg_paint, const reg_data_t *pcache_reg, + Picture pict) { const int dx = (w ? w->a.x: 0) + x; const int dy = (w ? w->a.y: 0) + y; - const bool argb = (w && w->mode == WMODE_ARGB); + const bool argb = (w && (WMODE_ARGB == w->mode || ps->o.force_win_blend)); const bool neg = (w && w->invert_color); render(ps, x, y, dx, dy, wid, hei, opacity, argb, neg, - pict, (w ? w->paint.ptex: ps->root_tile_paint.ptex), reg_paint, pcache_reg); + pict, (w ? w->paint.ptex: ps->root_tile_paint.ptex), + reg_paint, pcache_reg, (w ? &ps->o.glx_prog_win: NULL)); } static inline void |