# HG changeset patch # User Thinker K.F. Li # Date 1277898790 -28800 # Node ID de9d210e9c388c9fce72e8b761a8824125d93e11 # Parent 71df2896877c3aa357e096aac9099b7b76eae049 Specify width and height while create an image surface diff -r 71df2896877c -r de9d210e9c38 include/mb_graph_engine_openvg.h --- 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 { diff -r 71df2896877c -r de9d210e9c38 src/graph_engine_openvg.c --- 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; }