23#define GFX_DAMAGE(c, x, y, w, h) \
25 if (gfx_damage_sink != NULL) { \
26 gfx_damage_mark(gfx_damage_sink, (c), (x), (y), (w), (h)); \
34#define GFX_DAMAGE_CLIP(cv, rx, ry, rw, rh) \
36 if (gfx_damage_sink != NULL) { \
38 if (gfx_rect_intersect(gfx_rect_make((rx), (ry), (rw), (rh)), \
39 (cv)->clip, &dmg_)) { \
40 gfx_damage_mark(gfx_damage_sink, (cv), dmg_.x, dmg_.y, \
54 return c && c->
pixels && !gfx_rect_empty(c->
clip);
72#define GFX_INL static inline __attribute__((always_inline))
75#define GFX_INL static inline
146 gfx_fill_rect(c, x, y, w, 1, color);
173#define TRACE_BOX(c, x, y, w, h) \
175 if (s_trace_hold == 0) { \
176 gfx_trace_box((c), (x), (y), (w), (h)); \
180#define TRACE_HOLD() (++s_trace_hold)
182#define TRACE_RELEASE() (--s_trace_hold)
185#define TRACE_BOX(c, x, y, w, h) ((void)0)
187#define TRACE_HOLD() ((void)0)
189#define TRACE_RELEASE() ((void)0)
int s_trace_hold
The fit check's hold depth: 0 reports, more holds back.
Definition gfx.c:25
bool gfx_rect_intersect(gfx_rect_t a, gfx_rect_t b, gfx_rect_t *out)
Definition gfx.c:93
gfx: an RGB565 (16-bit red, green, blue) rasteriser with no dependencies.
Damage: the part of one frame buffer the rasteriser wrote since the last reset, kept as 16-row bands ...
GFX_INL void gfx_pixel_put_inl(gfx_canvas_t *c, int x, int y, gfx_color_t color)
One pixel inside the clip, not reported to the damage record: for a caller that reported the area it ...
Definition gfx_int.h:103
GFX_INL gfx_color_t gfx_pixel_get_inl(const gfx_canvas_t *c, int x, int y)
The body of gfx_pixel_get().
Definition gfx_int.h:119
#define GFX_INL
How the primitives' bodies are declared: plain inline.
Definition gfx_int.h:75
static bool canvas_ok(const gfx_canvas_t *c)
Whether c can be drawn on: it exists, has pixels and a non-empty clip.
Definition gfx_int.h:52
GFX_INL void gfx_pixel_inl(gfx_canvas_t *c, int x, int y, gfx_color_t color)
The body of gfx_pixel(): one pixel inside the clip, reported to the damage record.
Definition gfx_int.h:85
GFX_INL bool gfx_clip_intersect_inl(gfx_canvas_t *c, gfx_rect_t r)
The body of gfx_clip_intersect().
Definition gfx_int.h:155
#define GFX_DAMAGE(c, x, y, w, h)
Report a clipped rectangle written through c to the attached damage record (gfx_damage....
Definition gfx_int.h:23
GFX_INL void gfx_hline_inl(gfx_canvas_t *c, int x, int y, int w, gfx_color_t color)
The body of gfx_hline(): a horizontal line through gfx_fill_rect(), drawn leftwards for a negative w.
Definition gfx_int.h:136
gfx_rect_t clip
Definition gfx.h:134
int16_t width
Definition gfx.h:131
int16_t height
Definition gfx.h:132
gfx_color_t * pixels
Definition gfx.h:130
int32_t stride
Definition gfx.h:133