mirror of
https://github.com/yshui/picom.git
synced 2024-11-18 13:55:36 -05:00
Remove unused function rect_crop
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
28a2cc62fa
commit
a7d50ffdb2
1 changed files with 0 additions and 15 deletions
15
src/common.h
15
src/common.h
|
@ -1893,21 +1893,6 @@ free_fence(session_t *ps, XSyncFence *pfence) {
|
|||
#define free_fence(ps, pfence) ((void) 0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Crop a rectangle by another rectangle.
|
||||
*
|
||||
* psrc and pdst cannot be the same.
|
||||
*/
|
||||
static inline void
|
||||
rect_crop(rect_t *restrict pdst, const rect_t *psrc, const rect_t *pbound) {
|
||||
assert(psrc != pdst);
|
||||
assert(psrc != pbound);
|
||||
pdst->x1 = max_i(psrc->x1, pbound->x1);
|
||||
pdst->y1 = max_i(psrc->y1, pbound->y1);
|
||||
pdst->x2 = min_i(psrc->x2, pbound->x2);
|
||||
pdst->y2 = min_i(psrc->y2, pbound->y2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a rectangle includes the whole screen.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue