forked from enlightenment/efl
and make dynamic hint actually work when we have zero-copy texture
support. fully ok now for argb8888. SVN revision: 51380
This commit is contained in:
parent
c398484812
commit
a0d8db000e
|
@ -803,7 +803,6 @@ evas_object_image_size_set(Evas_Object *obj, int w, int h)
|
|||
o->engine_data = obj->layer->evas->engine.func->image_new_from_copied_data
|
||||
(obj->layer->evas->engine.data.output, w, h, NULL, o->cur.has_alpha,
|
||||
o->cur.cspace);
|
||||
printf("size set %i %i -> %p\n", w, h, o->engine_data);
|
||||
|
||||
if (o->engine_data)
|
||||
{
|
||||
|
@ -1080,9 +1079,12 @@ evas_object_image_data_get(const Evas_Object *obj, Eina_Bool for_writing)
|
|||
o->engine_data,
|
||||
for_writing,
|
||||
&data);
|
||||
if (o->engine_data)
|
||||
{
|
||||
if (obj->layer->evas->engine.func->image_stride_get)
|
||||
obj->layer->evas->engine.func->image_stride_get(obj->layer->evas->engine.data.output,
|
||||
o->engine_data, &o->cur.image.stride);
|
||||
}
|
||||
o->pixels_checked_out++;
|
||||
if (for_writing)
|
||||
{
|
||||
|
@ -2003,13 +2005,12 @@ evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint)
|
|||
MAGIC_CHECK_END();
|
||||
if (o->scale_hint == hint) return;
|
||||
#ifdef EVAS_FRAME_QUEUING
|
||||
if (o->scale_hint != hint)
|
||||
{
|
||||
if (o->engine_data)
|
||||
evas_common_pipe_op_image_flush(o->engine_data);
|
||||
}
|
||||
#endif
|
||||
o->scale_hint = hint;
|
||||
if (o->engine_data)
|
||||
{
|
||||
if (obj->layer->evas->engine.func->image_scale_hint_set)
|
||||
obj->layer->evas->engine.func->image_scale_hint_set
|
||||
(obj->layer->evas->engine.data.output,
|
||||
|
@ -2018,6 +2019,7 @@ evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint)
|
|||
obj->layer->evas->engine.func->image_stride_get(obj->layer->evas->engine.data.output,
|
||||
o->engine_data, &o->cur.image.stride);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the scale hint of a given image of the canvas.
|
||||
|
@ -2065,14 +2067,12 @@ evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hin
|
|||
MAGIC_CHECK_END();
|
||||
if (o->content_hint == hint) return;
|
||||
#ifdef EVAS_FRAME_QUEUING
|
||||
if (o->content_hint != hint)
|
||||
{
|
||||
if (o->engine_data)
|
||||
evas_common_pipe_op_image_flush(o->engine_data);
|
||||
}
|
||||
#endif
|
||||
printf("content hint!!!!\n");
|
||||
o->content_hint = hint;
|
||||
if (o->engine_data)
|
||||
{
|
||||
if (obj->layer->evas->engine.func->image_content_hint_set)
|
||||
obj->layer->evas->engine.func->image_content_hint_set
|
||||
(obj->layer->evas->engine.data.output,
|
||||
|
@ -2081,6 +2081,7 @@ evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hin
|
|||
obj->layer->evas->engine.func->image_stride_get(obj->layer->evas->engine.data.output,
|
||||
o->engine_data, &o->cur.image.stride);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the content hint of a given image of the canvas.
|
||||
|
|
|
@ -276,19 +276,13 @@ evas_gl_common_image_scale_hint_set(Evas_GL_Image *im, int hint)
|
|||
void
|
||||
evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint)
|
||||
{
|
||||
printf("xxxx1\n");
|
||||
if (im->content_hint == hint) return;
|
||||
im->content_hint = hint;
|
||||
printf("xxxx2\n");
|
||||
if (!im->gc) return;
|
||||
printf("xxxx3\n");
|
||||
if (!im->gc->shared->info.sec_image_map) return;
|
||||
printf("xxxx4\n");
|
||||
if (!im->gc->shared->info.bgra) return;
|
||||
printf("xxxx5\n");
|
||||
// does not handle yuv yet.
|
||||
if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return;
|
||||
printf("xxxx6\n");
|
||||
if (im->content_hint == EVAS_IMAGE_CONTENT_HINT_DYNAMIC)
|
||||
{
|
||||
if (im->cs.data)
|
||||
|
|
|
@ -783,12 +783,19 @@ eng_image_alpha_set(void *data, void *image, int has_alpha)
|
|||
re = (Render_Engine *)data;
|
||||
if (!image) return NULL;
|
||||
im = image;
|
||||
if (im->alpha == has_alpha) return image;
|
||||
if (im->native.data)
|
||||
{
|
||||
im->alpha = has_alpha;
|
||||
return image;
|
||||
}
|
||||
eng_window_use(re->win);
|
||||
if ((im->tex) && (im->tex->pt->dyn.img))
|
||||
{
|
||||
im->alpha = has_alpha;
|
||||
im->tex->alpha = im->alpha;
|
||||
return image;
|
||||
}
|
||||
/* FIXME: can move to gl_common */
|
||||
if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return im;
|
||||
if ((has_alpha) && (im->im->cache_entry.flags.alpha)) return image;
|
||||
|
@ -1632,13 +1639,13 @@ eng_image_content_hint_get(void *data __UNUSED__, void *image)
|
|||
return gim->content_hint;
|
||||
}
|
||||
|
||||
static int
|
||||
eng_image_stride_get(void *data, void *image)
|
||||
static void
|
||||
eng_image_stride_get(void *data, void *image, int *stride)
|
||||
{
|
||||
Render_Engine *re = (Render_Engine *)data;
|
||||
Evas_GL_Image *im = image;
|
||||
if ((im->tex) && (im->tex->pt->dyn.img)) return im->tex->pt->dyn.w;
|
||||
return im->w;
|
||||
*stride = im->w;
|
||||
if ((im->tex) && (im->tex->pt->dyn.img)) *stride = im->tex->pt->dyn.w;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue