e_plane_renderer: attach buffer to surface when deactivate 91/169291/4
authorChangyeon Lee <cyeon.lee@samsung.com>
Mon, 5 Feb 2018 11:35:35 +0000 (20:35 +0900)
committerchangyeon lee <cyeon.lee@samsung.com>
Thu, 8 Feb 2018 03:47:37 +0000 (03:47 +0000)
if e20 use e_pixmap function for setting backup buffer and
displaying buffer when deactivate, buffer change event isn't generated.
so use e_comp_wl_surface_attach.

Change-Id: I37eb6fb90f17bc166272f754983da0d199a62e64

src/bin/e_plane_renderer.c

index 04710746214db8401ab3431f5e7b32e13b6308a2..a4a9eac552434505c135a46418f3e321f7dcdc2a 100644 (file)
@@ -360,14 +360,7 @@ _e_plane_renderer_client_backup_buffer_set(E_Plane_Renderer_Client *renderer_cli
    wl_signal_add(&backup_buffer->destroy_signal, &renderer_client->buffer_destroy_listener);
    renderer_client->buffer_destroy_listener.notify = _e_plane_renderer_client_backup_buffer_cb_destroy;
 
-   /* reference backup buffer to comp data */
-   e_comp_wl_buffer_reference(&ec->comp_data->buffer_ref, backup_buffer);
-
-   /* set the backup buffer resource to the pixmap */
-   e_pixmap_resource_set(ec->pixmap, backup_buffer);
-   e_pixmap_dirty(ec->pixmap);
-   e_pixmap_refresh(ec->pixmap);
-
+   e_comp_wl_surface_attach(ec, backup_buffer);
    tbm_surface_internal_unref(copied_tsurface);
 
    return EINA_TRUE;
@@ -949,18 +942,10 @@ _e_plane_renderer_recover_ec(E_Plane_Renderer *renderer)
         if (!buffer) return;
      }
 
-   /* force update */
-   e_pixmap_usable_set(ec->pixmap, EINA_TRUE);
-   e_pixmap_resource_set(ec->pixmap, buffer);
-   e_pixmap_dirty(ec->pixmap);
-   e_pixmap_refresh(ec->pixmap);
-
-   if (!e_pixmap_image_refresh(ec->pixmap))
-     {
-        e_comp_wl_tbm_buffer_destroy(buffer);
-        return;
-     }
+   e_comp_wl_surface_attach(ec, buffer);
 
+   /* force update */
+   e_pixmap_image_refresh(ec->pixmap);
    e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
    e_comp_object_dirty(ec->frame);
    e_comp_object_render(ec->frame);