handle setting any pending opaque regions during surface commit and
cleanup the input region code also Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
bb64229ae9
commit
5448f0a1ac
|
@ -642,6 +642,51 @@ _e_comp_wl_surface_commit(E_Client *ec)
|
||||||
ec->wl_comp_data->pending.buffer = NULL;
|
ec->wl_comp_data->pending.buffer = NULL;
|
||||||
ec->wl_comp_data->pending.new_attach = EINA_FALSE;
|
ec->wl_comp_data->pending.new_attach = EINA_FALSE;
|
||||||
|
|
||||||
|
/* handle surface opaque region */
|
||||||
|
tmp = eina_tiler_new(ec->w, ec->h);
|
||||||
|
eina_tiler_tile_size_set(tmp, 1, 1);
|
||||||
|
eina_tiler_rect_add(tmp, &(Eina_Rectangle){0, 0, ec->client.w, ec->client.h});
|
||||||
|
|
||||||
|
src = eina_tiler_intersection(ec->wl_comp_data->pending.opaque, tmp);
|
||||||
|
if (src)
|
||||||
|
{
|
||||||
|
Eina_Rectangle *rect;
|
||||||
|
Eina_Iterator *itr;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
ec->shape_rects_num = 0;
|
||||||
|
|
||||||
|
itr = eina_tiler_iterator_new(src);
|
||||||
|
EINA_ITERATOR_FOREACH(itr, rect)
|
||||||
|
{
|
||||||
|
ec->shape_rects_num += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ec->shape_rects =
|
||||||
|
malloc(sizeof(Eina_Rectangle) * ec->shape_rects_num);
|
||||||
|
|
||||||
|
if (ec->shape_rects)
|
||||||
|
{
|
||||||
|
EINA_ITERATOR_FOREACH(itr, rect)
|
||||||
|
{
|
||||||
|
ec->shape_rects[i] = *(Eina_Rectangle *)((char *)rect);
|
||||||
|
|
||||||
|
ec->shape_rects[i].x = rect->x;
|
||||||
|
ec->shape_rects[i].y = rect->y;
|
||||||
|
ec->shape_rects[i].w = rect->w;
|
||||||
|
ec->shape_rects[i].h = rect->h;
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
eina_iterator_free(itr);
|
||||||
|
eina_tiler_free(src);
|
||||||
|
}
|
||||||
|
|
||||||
|
eina_tiler_free(tmp);
|
||||||
|
eina_tiler_clear(ec->wl_comp_data->pending.opaque);
|
||||||
|
|
||||||
/* handle surface damages */
|
/* handle surface damages */
|
||||||
if ((!ec->comp->nocomp) && (ec->frame))
|
if ((!ec->comp->nocomp) && (ec->frame))
|
||||||
{
|
{
|
||||||
|
@ -671,9 +716,7 @@ _e_comp_wl_surface_commit(E_Client *ec)
|
||||||
eina_tiler_clear(ec->wl_comp_data->pending.damage);
|
eina_tiler_clear(ec->wl_comp_data->pending.damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO !!! FIXME !!! */
|
/* handle input regions */
|
||||||
/* handle surface opaque region */
|
|
||||||
|
|
||||||
tmp = eina_tiler_new(ec->w, ec->h);
|
tmp = eina_tiler_new(ec->w, ec->h);
|
||||||
eina_tiler_tile_size_set(tmp, 1, 1);
|
eina_tiler_tile_size_set(tmp, 1, 1);
|
||||||
eina_tiler_rect_add(tmp, &(Eina_Rectangle){0, 0, ec->client.w, ec->client.h});
|
eina_tiler_rect_add(tmp, &(Eina_Rectangle){0, 0, ec->client.w, ec->client.h});
|
||||||
|
@ -696,25 +739,20 @@ _e_comp_wl_surface_commit(E_Client *ec)
|
||||||
ec->shape_input_rects =
|
ec->shape_input_rects =
|
||||||
malloc(sizeof(Eina_Rectangle) * ec->shape_input_rects_num);
|
malloc(sizeof(Eina_Rectangle) * ec->shape_input_rects_num);
|
||||||
|
|
||||||
if (!ec->shape_input_rects)
|
if (ec->shape_input_rects)
|
||||||
{
|
{
|
||||||
eina_iterator_free(itr);
|
EINA_ITERATOR_FOREACH(itr, rect)
|
||||||
eina_tiler_free(src);
|
{
|
||||||
eina_tiler_free(tmp);
|
ec->shape_input_rects[i] =
|
||||||
return;
|
*(Eina_Rectangle *)((char *)rect);
|
||||||
}
|
|
||||||
|
|
||||||
EINA_ITERATOR_FOREACH(itr, rect)
|
ec->shape_input_rects[i].x = rect->x;
|
||||||
{
|
ec->shape_input_rects[i].y = rect->y;
|
||||||
ec->shape_input_rects[i] =
|
ec->shape_input_rects[i].w = rect->w;
|
||||||
*(Eina_Rectangle *)((char *)rect);
|
ec->shape_input_rects[i].h = rect->h;
|
||||||
|
|
||||||
ec->shape_input_rects[i].x = rect->x;
|
i++;
|
||||||
ec->shape_input_rects[i].y = rect->y;
|
}
|
||||||
ec->shape_input_rects[i].w = rect->w;
|
|
||||||
ec->shape_input_rects[i].h = rect->h;
|
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
eina_iterator_free(itr);
|
eina_iterator_free(itr);
|
||||||
|
|
Loading…
Reference in New Issue