summaryrefslogtreecommitdiff
path: root/boilerplate
diff options
context:
space:
mode:
authorHenry (Yu) Song <hsong@sisa.samsung.com>2012-03-13 22:06:46 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-19 11:01:47 +0000
commit1e4f385dec03083b2453205bf5f4bef25b3af806 (patch)
tree01464c849fcf9a84ce0251a278fd98048665ab33 /boilerplate
parenta473c035676168d21cd3b2fb61eaad2117b40057 (diff)
downloadcairo-1e4f385dec03083b2453205bf5f4bef25b3af806.tar.gz
boilerplate/gl: set width and height to be at least 1
Diffstat (limited to 'boilerplate')
-rw-r--r--boilerplate/cairo-boilerplate-egl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/boilerplate/cairo-boilerplate-egl.c b/boilerplate/cairo-boilerplate-egl.c
index ce0aceb6c..e1a46e444 100644
--- a/boilerplate/cairo-boilerplate-egl.c
+++ b/boilerplate/cairo-boilerplate-egl.c
@@ -131,6 +131,11 @@ _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,
ceil (width),