Implement the double buffering based renderer
authorSung-jae Park <nicesj.park@samsung.com>
Fri, 31 Oct 2014 10:53:25 +0000 (19:53 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Fri, 31 Oct 2014 10:53:25 +0000 (19:53 +0900)
[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: I8ca8fd5712b69261059420b1faf274bf93e92b0e

src/virtual_window.c

index 2d74b86..f177819 100644 (file)
@@ -520,8 +520,8 @@ static Ecore_X_Pixmap alloc_pixmap_cb(void *data, Ecore_X_Window parent, int w,
 
     info->w = w;
     info->h = h;
-    depth >>= 3;
     DbgPrint("Size of ee is updated: %dx%d - %d (info: %p)\n", info->w, info->h, depth, info);
+    depth >>= 3;
 
     if (dynamicbox_resource_id(info->handle, DBOX_PRIMARY_BUFFER) == 0u) {
        /**
@@ -794,7 +794,11 @@ static void post_render_cb(void *data, Evas *e, void *event_info)
 
        if (idx == DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT) {
            /* Send updated event for PRIMARY BUFFER */
-           dynamicbox_send_updated_by_idx(info->handle, DBOX_PRIMARY_BUFFER);
+           if (info->front_resource_id == dynamicbox_resource_id(info->handle, DBOX_PRIMARY_BUFFER)) {
+               dynamicbox_send_updated_by_idx(info->handle, DBOX_PRIMARY_BUFFER);
+           } else {
+               DbgPrint("Unable to send updated: %u (%u)\n", info->front_resource_id, dynamicbox_resource_id(info->handle, DBOX_PRIMARY_BUFFER));
+           }
        }
     } else if (info->type == VWIN_SW_BUF) {
        dynamicbox_sync_buffer(info->handle);
@@ -825,6 +829,7 @@ PUBLIC void *dynamicbox_get_evas_object(const char *id, int is_gbar)
     vwin_info_t info;
     Evas_Object *rect;
     const char *engine;
+    int gl_is_turned_on = 0;
 
     if (!s_info.alloc_canvas && !s_info.alloc_canvas_with_stride && !s_info.alloc_canvas_with_pixmap) {
        s_info.alloc_canvas_with_pixmap = dlsym(RTLD_DEFAULT, "ecore_evas_gl_x11_pixmap_allocfunc_new");
@@ -895,6 +900,8 @@ PUBLIC void *dynamicbox_get_evas_object(const char *id, int is_gbar)
            info->ee = s_info.alloc_canvas_with_pixmap(NULL, 0u, 0, 0, info->w, info->h, alloc_pixmap_cb, free_pixmap_cb, info);
            if (!info->ee) {
                ErrPrint("Unable to create a ee for pixmap\n");
+           } else {
+               gl_is_turned_on = 1;
            }
        }
     }
@@ -930,9 +937,13 @@ PUBLIC void *dynamicbox_get_evas_object(const char *id, int is_gbar)
        return NULL;
     }
 
-    pre_render_cb(info, NULL, NULL);
-    ecore_evas_alpha_set(info->ee, EINA_TRUE);
-    post_render_cb(info, NULL, NULL);
+    if (!gl_is_turned_on) {
+       pre_render_cb(info, NULL, NULL);
+       ecore_evas_alpha_set(info->ee, EINA_TRUE);
+       post_render_cb(info, NULL, NULL);
+    } else {
+       DbgPrint("opengl-x11 engine should not turn on the alpha\n");
+    }
 
     ecore_evas_manual_render_set(info->ee, EINA_FALSE);
     ecore_evas_resize(info->ee, info->w, info->h);