e_comp_wl: damage a e_comp_object once the viewport has been changed
authorBoram Park <boram1288.park@samsung.com>
Wed, 13 Jan 2016 09:21:05 +0000 (18:21 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Thu, 21 Jan 2016 07:20:11 +0000 (16:20 +0900)
Change-Id: Iab0a4bbd9b34f7bb20d79aa76d6c9932d036a3fd

src/bin/e_comp_wl.c

index 11d3a2f8643ecbcfb6498700856342af41651a15..4639cd97ac2902ab905caff338d443dc681fc564 100644 (file)
@@ -1947,7 +1947,6 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
    state->sx = 0;
    state->sy = 0;
    state->new_attach = EINA_FALSE;
-   state->buffer_viewport.changed = 0;
 
    /* insert state frame callbacks into comp_data->frames
     * NB: This clears state->frames list */
@@ -1980,7 +1979,8 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
              EINA_LIST_FREE(state->damages, dmg)
                {
                   /* not creating damage for ec that shows a underlay video */
-                  if (!e_comp->wl_comp_data->available_hw_accel.underlay ||
+                  if (state->buffer_viewport.changed ||
+                      !e_comp->wl_comp_data->available_hw_accel.underlay ||
                       !buffer || buffer->type != E_COMP_WL_BUFFER_TYPE_VIDEO)
                     e_comp_object_damage(ec->frame, dmg->x, dmg->y, dmg->w, dmg->h);
 
@@ -2042,10 +2042,13 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
         eina_tiler_clear(state->input);
      }
 
-   if ((buffer && buffer->type == E_COMP_WL_BUFFER_TYPE_VIDEO) &&
+   if (!state->buffer_viewport.changed &&
+       (buffer && buffer->type == E_COMP_WL_BUFFER_TYPE_VIDEO) &&
        e_comp->wl_comp_data->available_hw_accel.underlay)
      e_pixmap_image_clear(ec->pixmap, 1);
 
+   state->buffer_viewport.changed = 0;
+
    return;
 
 unmapped: