evas proxy: make it work for load_region
Summary: This makes a proxy object use a selective region of a source object. So far a proxy has not worked for load_region at all. This should be better solution than https://phab.enlightenment.org/D10604 introducing new interface. This is useful when the source is too big to allocate a proxy surface. This will be used by elm_scroller to solve following issue. [Issue] If size of elm_sclloer content is too big, then the proxy of elm_scroller to show loop effect does not work. Because evas_gl_common_image_surface_new does not allow bigger size surface than max_texture_size Reviewers: Hermet, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10626
This commit is contained in:
parent
50f3648391
commit
8986f8d2dc
|
@ -2355,7 +2355,8 @@ _evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj,
|
|||
*uvw = *imagew;
|
||||
*uvh = *imageh;
|
||||
}
|
||||
else if (oi && oi->engine_data)
|
||||
else if (oi && oi->engine_data &&
|
||||
(!o->cur->source || o->load_opts->region.w == 0 || o->load_opts->region.h == 0))
|
||||
{
|
||||
if (oi->has_filter)
|
||||
pixels = evas_filter_output_buffer_get(source->object);
|
||||
|
|
|
@ -2323,6 +2323,7 @@ evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, Ev
|
|||
int level = 1;
|
||||
void *ctx;
|
||||
int w, h, off_x = 0, off_y = 0;
|
||||
Eina_Rectangle lr;
|
||||
|
||||
#ifdef REND_DBG
|
||||
level = __RD_level;
|
||||
|
@ -2333,7 +2334,16 @@ evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, Ev
|
|||
source = efl_data_scope_get(eo_source, EFL_CANVAS_OBJECT_CLASS);
|
||||
proxy = efl_data_scope_get(eo_proxy, EFL_CANVAS_OBJECT_CLASS);
|
||||
|
||||
if (proxy->proxy->proxies || (!proxy->cur->clipper) || (!proxy->cur->has_fixed_size))
|
||||
evas_object_image_load_region_get(eo_proxy, &lr.x, &lr.y, &lr.w, &lr.h);
|
||||
|
||||
if (lr.w > 0 && lr.h > 0)
|
||||
{
|
||||
w = lr.w;
|
||||
h = lr.h;
|
||||
off_x = -lr.x;
|
||||
off_y = -lr.y;
|
||||
}
|
||||
else if (proxy->proxy->proxies || (!proxy->cur->clipper) || (!proxy->cur->has_fixed_size))
|
||||
{
|
||||
/* make full surface available if this proxy is being sampled from */
|
||||
w = source->cur->geometry.w;
|
||||
|
|
Loading…
Reference in New Issue