patch: gl - set width and height to be at least 1 in egl boilerplate
"Henry (Yu) Song - SISA" <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <3955FA337689574EB32F94B12A7E6E9E0B4E10F5@ex10mail> |
Author: Henry Song <[email protected]> Date: Tue Mar 13 15:03:39 2012 -0700 gl/boilerplate: set width and height to be at least 1 diff --git a/boilerplate/cairo-boilerplate-egl.c b/boilerplate/cairo-boilerplate-egl.c index ce0aceb..8b942d3 100644 --- a/boilerplate/cairo-boilerplate-egl.c +++ b/boilerplate/cairo-boilerplate-egl.c @@ -130,6 +130,9 @@ _cairo_boilerplate_egl_create_surface (const char *name, } gltc->device = cairo_egl_device_create (gltc->dpy, gltc->ctx); + + if (width < 1) width = 1; + if (height < 1) height = 1; gltc->surface = surface = cairo_gl_surface_create (gltc->device, content, -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo