gl: set default VBO size 256K 04/45104/2
authorHenry Song <henry.song@samsung.com>
Fri, 24 Jul 2015 20:59:44 +0000 (13:59 -0700)
committernisanthmp <nisanth.mp@samsung.com>
Mon, 3 Aug 2015 13:18:33 +0000 (18:48 +0530)
Set default VBO size to be 256K, previous 1M is too big to be handled on
at least intel driver with GL context <= 3.0

Set both egl and evasgl vbo size to be 16K

Change-Id: I7fd504ec47523dbe8ae85f08f3798f1a10879161
Signed-off-by: nisanthmp <nisanth.mp@samsung.com>
src/cairo-egl-context.c
src/cairo-evas-gl-context.c
src/cairo-gl-private.h

index 5b67d4b..0a13c6a 100644 (file)
@@ -343,7 +343,7 @@ cairo_egl_device_create (EGLDisplay dpy, EGLContext egl)
      * This smaller size means that flushing needs to be done more often,
      * but it is less demanding of scarce memory on embedded devices.
      */
-    ctx->base.vbo_size = 16*1024;
+    ctx->base.vbo_size = 16 * 1024;
 
     eglMakeCurrent (dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
 
index 3cd4e0e..8135eda 100644 (file)
@@ -337,6 +337,9 @@ cairo_evas_gl_device_create (Evas_GL *evas_gl,
     else
        ctx->has_multithread_makecurrent = FALSE;
 
+    // reset vbo_size
+    ctx->base.vbo_size = 16 * 1024;
+
     evas_gl_make_current (ctx->evas_gl, NULL, NULL);
     return &ctx->base.base;
 }
index ad08abd..e5a709e 100644 (file)
  * but larger means hogging more memory and can cause trouble for drivers
  * (especially on embedded devices). Use the CAIRO_GL_VBO_SIZE environment
  * variable to set this to a different size. */
-#define CAIRO_GL_VBO_SIZE_DEFAULT (1024*1024)
+#define CAIRO_GL_VBO_SIZE_DEFAULT (256*1024)
 
 #define MIN_IMAGE_CACHE_WIDTH 512
 #define MIN_IMAGE_CACHE_HEIGHT 512