Mercurial > MadButterfly
changeset 592:de9d210e9c38 openvg
Specify width and height while create an image surface
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 30 Jun 2010 19:53:10 +0800 |
parents | 71df2896877c |
children | ac942664fe86 |
files | include/mb_graph_engine_openvg.h src/graph_engine_openvg.c |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/include/mb_graph_engine_openvg.h Wed Jun 30 19:45:20 2010 +0800 +++ b/include/mb_graph_engine_openvg.h Wed Jun 30 19:53:10 2010 +0800 @@ -96,6 +96,7 @@ void *surface; mbe_t *asso_mbe; /* There is a association between * surface and mbe */ + int w, h; }; struct _ge_openvg_pattern {
--- a/src/graph_engine_openvg.c Wed Jun 30 19:45:20 2010 +0800 +++ b/src/graph_engine_openvg.c Wed Jun 30 19:53:10 2010 +0800 @@ -202,7 +202,7 @@ EGLSurface surface; EGLDisplay display; EGLConfig config; - EGLint attrib_list[2] = {EGL_NONE}; + EGLint attrib_list[5]; mbe_surface_t *mbe_surface; int r; @@ -212,6 +212,11 @@ return NULL; display = _VG_DISPLAY(); + attrib_list[0] = EGL_WIDTH; + attrib_list[1] = w; + attrib_list[2] = EGL_HEIGHT; + attrib_list[3] = h; + attrib_list[4] = EGL_NONE; /* Some implementation does not support pbuffer. * We need use some other surface to replace this one. */ @@ -226,6 +231,8 @@ } mbe_surface->surface = surface; mbe_surface->asso_mbe = NULL; + mbe_surface->w = w; + mbe_surface->h = h; return mbe_surface; }