[cairo] [PATCH] gl: Keep window size the same as surface's size.
chris at chris-wilson.co.uk
Fri Jun 29 02:35:05 PDT 2012
On Fri, 29 Jun 2012 08:48:49 +0800, Chuanbo Weng <strgnm at gmail.com> wrote:
> When we pass non-integer width and height to
> _cairo_boilerplate_gl_create_window(), it will create a window and
> a gl-surface with different size. This will result in some problems.
> For example, if we create a window and a gl-surface by invoking
> _cairo_boilerplate_gl_create_window(, , 39.5, 39.5, ...), and do a
> simple fill operation:
> cairo_set_source_rgb (cr, 1, 0, 0);
> cairo_rectangle (cr, 0, 0, 10, 1);
> There will be no red rectangle in output, which is not correct.
> This patch fixes 5 cases in cairo-test-suite, for example,
I thought the patch was on the right lines, but would rather see the
width/height converted to their integer representation upfront rather
than at each use.
So I've pushed a reworked patch, many thanks.
Chris Wilson, Intel Open Source Technology Centre
More information about the cairo