elm_glview: make_current(NULL, NULL) before delete
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 14 Apr 2015 11:52:38 +0000 (20:52 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 14 Apr 2015 12:04:01 +0000 (21:04 +0900)
The surface and context should not be current when deleted.

Evas GL would work just fine but since it deletes the surface
and context immediately upon request, those should not be
current.

This is a slightly different behaviour from EGL.

src/lib/elm_glview.c

index 0c4e643..0792cc9 100644 (file)
@@ -54,6 +54,8 @@ _glview_update_surface(Evas_Object *obj)
    ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
    if (!sd) return;
 
+   evas_gl_make_current(sd->evasgl, NULL, NULL);
+
    if (sd->surface)
      {
         evas_object_image_native_surface_set(wd->resize_obj, NULL);
@@ -270,6 +272,7 @@ _elm_glview_evas_object_smart_del(Eo *obj, Elm_Glview_Data *sd)
      }
 
    ecore_idle_enterer_del(sd->render_idle_enterer);
+   evas_gl_make_current(sd->evasgl, NULL, NULL);
 
    if (sd->surface)
      {