[Cairo Tutorial]add EvasGL config
authorhk57.kim <hk57.kim@samsung.com>
Mon, 5 Oct 2015 08:41:43 +0000 (17:41 +0900)
committerhk57.kim <hk57.kim@samsung.com>
Mon, 5 Oct 2015 08:41:43 +0000 (17:41 +0900)
Change-Id: Id4afe0195d4126f3bd9987335cfc6ee05cbd2192
Signed-off-by: hk57.kim <hk57.kim@samsung.com>
org.tizen.tutorials/html/native/graphics/cairo_tutorial_n.htm

index 5760d58..438ca09 100644 (file)
@@ -237,10 +237,12 @@ elm_config_accel_preference_set(&quot;opengl&quot;);
 <pre class="prettyprint">
 evas_object_image_pixels_get_callback_set(ad-&gt;img, cairo_drawing, NULL);
 </pre></li>
-<li>For using hardware-accelerated Cairo rendering, set <span style="font-family: Courier New,Courier,monospace">CAIRO_GL_COMPOSITOR</span> to MSAA compositor:
+<li>In order to use fast and optimized Cairo GLES rendering, set Cairo_GL_Compositor and Evasgl configurations:
 
 <pre class="prettyprint">
 setenv(&quot;CAIRO_GL_COMPOSITOR&quot;, &quot;msaa&quot;, 1);
+ad-&gt;evas_gl_config-&gt;stencil_bits = EVAS_GL_STANCIL_BIT_8;
+ad-&gt;evas_gl_config-&gt;multisample_bits = EVAS_GL_MULTISAMPLE_MED;
 </pre></li>
 
 <li>To prevent unnecessary context switching in the Cairo evas-gl backend:
@@ -276,6 +278,8 @@ init_cairo_evasgl_drawing(appdata_s *ad)
 &nbsp;&nbsp;&nbsp;ad-&gt;evas_gl = evas_gl_new(evas_object_evas_get(ad-&gt;img));
 &nbsp;&nbsp;&nbsp;ad-&gt;evas_gl_config = evas_gl_config_new();
 &nbsp;&nbsp;&nbsp;ad-&gt;evas_gl_config-&gt;color_format = EVAS_GL_RGBA_8888;
+&nbsp;&nbsp;&nbsp;ad-&gt;evas_gl_config-&gt;stencil_bits = EVAS_GL_STANCIL_BIT_8;
+&nbsp;&nbsp;&nbsp;ad-&gt;evas_gl_config-&gt;multisample_bits = EVAS_GL_MULTISAMPLE_MED;
 
 &nbsp;&nbsp;&nbsp;// Create a surface and context
 &nbsp;&nbsp;&nbsp;ad-&gt;evas_gl_surface = evas_gl_surface_create(ad-&gt;evas_gl, ad-&gt;evas_gl_config, ad-&gt;width, ad-&gt;height);