WINGs/wayland: remove diagnostic fprintf, keep bounds clipping

Remove the verbose COMPOSITE fprintf and BAD composite warning that
were used for debugging. Keep the source/destination bounds clipping
as it correctly handles the case where view->size diverges from the
backing image dimensions during realization.
This commit is contained in:
Window Maker 2026-05-25 13:21:14 +02:00
parent ef98cc3c64
commit 7a93b1d389
2 changed files with 29 additions and 862 deletions

View File

@ -481,36 +481,19 @@ static void wl_redisplay(void *vctx, W_View *view)
if (view->parent && view->size.width > 0 && view->size.height > 0) {
pixman_image_t *src = (pixman_image_t *)W_GetViewBacking(view->window);
pixman_image_t *dst = (pixman_image_t *)W_GetViewBacking(view->parent->window);
if (!src || !dst || !pixman_image_get_data(src) || !pixman_image_get_data(dst)) {
wwarning("wl_redisplay: BAD composite view=0x%lx size=%dx%d src=%p dst=%p"
" src_data=%p dst_data=%p src_dim=%dx%d dst_dim=%dx%d",
(unsigned long)view->window,
view->size.width, view->size.height,
(void*)src, (void*)dst,
src ? (void*)pixman_image_get_data(src) : NULL,
dst ? (void*)pixman_image_get_data(dst) : NULL,
src ? pixman_image_get_width(src) : 0,
src ? pixman_image_get_height(src) : 0,
dst ? pixman_image_get_width(dst) : 0,
dst ? pixman_image_get_height(dst) : 0);
}
if (src && dst && pixman_image_get_data(src) && pixman_image_get_data(dst)) {
if (src && dst) {
int sw = pixman_image_get_width(src);
int sh = pixman_image_get_height(src);
int dw = pixman_image_get_width(dst);
int dh = pixman_image_get_height(dst);
int cw = sw < (int)view->size.width ? sw : (int)view->size.width;
int ch = sh < (int)view->size.height ? sh : (int)view->size.height;
/* Clip to destination bounds */
if (view->pos.x + cw > dw) cw = dw - view->pos.x;
if (view->pos.y + ch > dh) ch = dh - view->pos.y;
if (cw > 0 && ch > 0 && view->pos.x >= 0 && view->pos.y >= 0) {
fprintf(stderr, "COMPOSITE view=0x%lx pos=%d,%d cw=%d ch=%d sw=%d sh=%d dw=%d dh=%d\n",
(unsigned long)view->window, view->pos.x, view->pos.y, cw, ch, sw, sh, dw, dh);
if (cw > 0 && ch > 0 && view->pos.x >= 0 && view->pos.y >= 0)
pixman_image_composite32(PIXMAN_OP_OVER, src, NULL, dst,
0, 0, 0, 0,
view->pos.x, view->pos.y, cw, ch);
}
}
}

File diff suppressed because it is too large Load Diff