summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-09-23 11:19:18 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-10-20 12:16:43 +0900
commit899f28a4abf11858ccb701b00895a235bbfe70fc (patch)
treeb4def9a3d159e85dffbf1bd7f94472f86d3468c4
parent0799bb1f8db164e6bfa934bedd862ff1dd98fed4 (diff)
GLView: cosmetic changes
-rw-r--r--src/lib/elm_glview.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/lib/elm_glview.c b/src/lib/elm_glview.c
index 97e2dfcdf..d12012d53 100644
--- a/src/lib/elm_glview.c
+++ b/src/lib/elm_glview.c
@@ -47,31 +47,23 @@ _elm_glview_elm_widget_on_focus(Eo *obj, Elm_Glview_Data *_pd EINA_UNUSED)
47static void 47static void
48_glview_update_surface(Evas_Object *obj) 48_glview_update_surface(Evas_Object *obj)
49{ 49{
50 Evas_Native_Surface ns = { 0 };
50 ELM_GLVIEW_DATA_GET(obj, sd); 51 ELM_GLVIEW_DATA_GET(obj, sd);
51 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 52 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
52 if (!sd) return; 53 if (!sd) return;
53 54
54 if (sd->surface) 55 if (sd->surface)
55 { 56 {
56 evas_object_image_native_surface_set 57 evas_object_image_native_surface_set(wd->resize_obj, NULL);
57 (wd->resize_obj, NULL);
58 evas_gl_surface_destroy(sd->evasgl, sd->surface); 58 evas_gl_surface_destroy(sd->evasgl, sd->surface);
59 sd->surface = NULL;
60 } 59 }
61 60
62 evas_object_image_size_set(wd->resize_obj, sd->w, sd->h); 61 evas_object_image_size_set(wd->resize_obj, sd->w, sd->h);
63 62
64 if (!sd->surface) 63 sd->surface = evas_gl_surface_create(sd->evasgl, sd->config, sd->w, sd->h);
65 { 64 evas_gl_native_surface_get(sd->evasgl, sd->surface, &ns);
66 Evas_Native_Surface ns; 65 evas_object_image_native_surface_set(wd->resize_obj, &ns);
67 66 elm_glview_changed_set(obj);
68 sd->surface = evas_gl_surface_create
69 (sd->evasgl, sd->config, sd->w, sd->h);
70 evas_gl_native_surface_get(sd->evasgl, sd->surface, &ns);
71 evas_object_image_native_surface_set
72 (wd->resize_obj, &ns);
73 elm_glview_changed_set(obj);
74 }
75} 67}
76 68
77EOLIAN static void 69EOLIAN static void