From 6f132f1d6f595821ab1ba78caef571c7ac2c587f Mon Sep 17 00:00:00 2001 From: "hk57.kim" Date: Mon, 5 Oct 2015 17:41:43 +0900 Subject: [PATCH] [Cairo Tutorial]add EvasGL config Change-Id: Id4afe0195d4126f3bd9987335cfc6ee05cbd2192 Signed-off-by: hk57.kim --- org.tizen.tutorials/html/native/graphics/cairo_tutorial_n.htm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.tizen.tutorials/html/native/graphics/cairo_tutorial_n.htm b/org.tizen.tutorials/html/native/graphics/cairo_tutorial_n.htm index 5760d58..438ca09 100644 --- a/org.tizen.tutorials/html/native/graphics/cairo_tutorial_n.htm +++ b/org.tizen.tutorials/html/native/graphics/cairo_tutorial_n.htm @@ -237,10 +237,12 @@ elm_config_accel_preference_set("opengl");
 evas_object_image_pixels_get_callback_set(ad->img, cairo_drawing, NULL);
 
-
  • For using hardware-accelerated Cairo rendering, set CAIRO_GL_COMPOSITOR to MSAA compositor: +
  • In order to use fast and optimized Cairo GLES rendering, set Cairo_GL_Compositor and Evasgl configurations:
     setenv("CAIRO_GL_COMPOSITOR", "msaa", 1);
    +ad->evas_gl_config->stencil_bits = EVAS_GL_STANCIL_BIT_8;
    +ad->evas_gl_config->multisample_bits = EVAS_GL_MULTISAMPLE_MED;
     
  • To prevent unnecessary context switching in the Cairo evas-gl backend: @@ -276,6 +278,8 @@ init_cairo_evasgl_drawing(appdata_s *ad)    ad->evas_gl = evas_gl_new(evas_object_evas_get(ad->img));    ad->evas_gl_config = evas_gl_config_new();    ad->evas_gl_config->color_format = EVAS_GL_RGBA_8888; +   ad->evas_gl_config->stencil_bits = EVAS_GL_STANCIL_BIT_8; +   ad->evas_gl_config->multisample_bits = EVAS_GL_MULTISAMPLE_MED;    // Create a surface and context    ad->evas_gl_surface = evas_gl_surface_create(ad->evas_gl, ad->evas_gl_config, ad->width, ad->height); -- 2.7.4