Re: minor fix for GdkPixbuf



Havoc Pennington <hp redhat com> writes:

> Havoc Pennington <hp redhat com> writes: 
> > Owen was suggesting that we actually put the grab in gdk_image_get()
> > itself though - if the grab doesn't seem to matter for speed that's
> > probably feasible.

> Solution #2 I'm considering is to change _gdk_x11_get_image() to first
> create the image with XCreateImage(), then use XGetSubImage() to copy
> in the clipped-to-screen area of the window. So we always return an
> image of the requested size, but leave parts of it undefined if they
> are offscreen.
> 
> I like this solution best, because it's the same behavior as for
> gdk_pixbuf_get_from_drawable(), and is likely what people usually
> want. Also it avoids any possible breakage for people using
> gdk_image_get() in legacy code.

This is a fine way of doing things - it corresponds to the idea
that we want to make offscreen areas just like obscured areas -
undefined contents.

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]