diff options
Diffstat (limited to 'include/yasl')
| -rw-r--r-- | include/yasl/yasl.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/yasl/yasl.h b/include/yasl/yasl.h index 6d2b4f0..15bbe16 100644 --- a/include/yasl/yasl.h +++ b/include/yasl/yasl.h @@ -62,7 +62,7 @@ struct yasl_surface_options { const char *title; int width, height; /**< Required. */ enum yasl_surface_type type; - bool undecorated, fixed_size; + bool undecorated, fixed_size, tearing; void *userdata; /** Called when the window needs drawing while the system blocks the event * loop, as during a macOS live resize; draw and present before returning. @@ -281,8 +281,12 @@ YASL_API uint64_t yasl_time_ns(void); * 0xAARRGGBB pixels, rows tightly packed. They persist, and a resize keeps the * overlap and zeroes the rest. Valid until the next wait. Present to show them; * the system may also show them when it redraws the window. */ +struct yasl_damage { + int x, y, width, height; +}; YASL_API uint32_t *yasl_cpu_pixels(yasl_surface *surface, int *pixel_width, int *pixel_height); YASL_API int yasl_cpu_present(yasl_surface *surface); +YASL_API int yasl_cpu_present_damage(yasl_surface *surface, const struct yasl_damage *damage, int count); typedef void (*yasl_gl_proc)(void); /** These four may run on a rendering thread; synchronize them with destruction. |
