提交 4b4496db 编写于 作者: G Gerd Hoffmann 提交者: Blue Swirl

console: clip update rectangle

Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 bc210eb1
......@@ -229,6 +229,16 @@ static inline void unregister_displaychangelistener(DisplayState *ds,
static inline void dpy_gfx_update(DisplayState *s, int x, int y, int w, int h)
{
struct DisplayChangeListener *dcl;
int width = pixman_image_get_width(s->surface->image);
int height = pixman_image_get_height(s->surface->image);
x = MAX(x, 0);
y = MAX(y, 0);
x = MIN(x, width);
y = MIN(y, height);
w = MIN(w, width - x);
h = MIN(h, height - y);
QLIST_FOREACH(dcl, &s->listeners, next) {
if (dcl->dpy_gfx_update) {
dcl->dpy_gfx_update(s, x, y, w, h);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册