Eliminate implicit conversions
Use explicit conversions everywhere. Adding bounds check assertions when necessary. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
26
src/render.h
26
src/render.h
@@ -2,9 +2,9 @@
|
||||
// Copyright (c) Yuxuan Shui <yshuiv7@gmail.com>
|
||||
#pragma once
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/render.h>
|
||||
#include <stdbool.h>
|
||||
#include <xcb/render.h>
|
||||
#include <xcb/xcb.h>
|
||||
#ifdef CONFIG_OPENGL
|
||||
#include "backend/gl/glx.h"
|
||||
#endif
|
||||
@@ -16,24 +16,20 @@ typedef struct win win;
|
||||
typedef struct session session_t;
|
||||
|
||||
typedef struct paint {
|
||||
xcb_pixmap_t pixmap;
|
||||
xcb_render_picture_t pict;
|
||||
glx_texture_t *ptex;
|
||||
xcb_pixmap_t pixmap;
|
||||
xcb_render_picture_t pict;
|
||||
glx_texture_t *ptex;
|
||||
#ifdef CONFIG_OPENGL
|
||||
struct glx_fbconfig_info *fbcfg;
|
||||
struct glx_fbconfig_info *fbcfg;
|
||||
#endif
|
||||
} paint_t;
|
||||
|
||||
void
|
||||
render(session_t *ps, int x, int y, int dx, int dy, int wid, int hei,
|
||||
double opacity, bool argb, bool neg,
|
||||
xcb_render_picture_t pict, glx_texture_t *ptex,
|
||||
const region_t *reg_paint, const glx_prog_main_t *pprogram);
|
||||
void
|
||||
paint_one(session_t *ps, win *w, const region_t *reg_paint);
|
||||
void render(session_t *ps, int x, int y, int dx, int dy, int w, int h, double opacity,
|
||||
bool argb, bool neg, xcb_render_picture_t pict, glx_texture_t *ptex,
|
||||
const region_t *reg_paint, const glx_prog_main_t *pprogram);
|
||||
void paint_one(session_t *ps, win *w, const region_t *reg_paint);
|
||||
|
||||
void
|
||||
paint_all(session_t *ps, win * const t, bool ignore_damage);
|
||||
void paint_all(session_t *ps, win *const t, bool ignore_damage);
|
||||
|
||||
void free_picture(xcb_connection_t *c, xcb_render_picture_t *p);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user