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
|
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,
|
(obj->layer->evas->engine.data.output, w, h, NULL, o->cur.has_alpha,
|
||||||
o->cur.cspace);
|
o->cur.cspace);
|
||||||
printf("size set %i %i -> %p\n", w, h, o->engine_data);
|
|
||||||
|
|
||||||
if (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,
|
o->engine_data,
|
||||||
for_writing,
|
for_writing,
|
||||||
&data);
|
&data);
|
||||||
if (obj->layer->evas->engine.func->image_stride_get)
|
if (o->engine_data)
|
||||||
obj->layer->evas->engine.func->image_stride_get(obj->layer->evas->engine.data.output,
|
{
|
||||||
o->engine_data, &o->cur.image.stride);
|
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++;
|
o->pixels_checked_out++;
|
||||||
if (for_writing)
|
if (for_writing)
|
||||||
{
|
{
|
||||||
|
@ -2003,20 +2005,20 @@ evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint)
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (o->scale_hint == hint) return;
|
if (o->scale_hint == hint) return;
|
||||||
#ifdef EVAS_FRAME_QUEUING
|
#ifdef EVAS_FRAME_QUEUING
|
||||||
if (o->scale_hint != hint)
|
if (o->engine_data)
|
||||||
{
|
evas_common_pipe_op_image_flush(o->engine_data);
|
||||||
if (o->engine_data)
|
|
||||||
evas_common_pipe_op_image_flush(o->engine_data);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
o->scale_hint = hint;
|
o->scale_hint = hint;
|
||||||
if (obj->layer->evas->engine.func->image_scale_hint_set)
|
if (o->engine_data)
|
||||||
obj->layer->evas->engine.func->image_scale_hint_set
|
{
|
||||||
(obj->layer->evas->engine.data.output,
|
if (obj->layer->evas->engine.func->image_scale_hint_set)
|
||||||
o->engine_data, o->scale_hint);
|
obj->layer->evas->engine.func->image_scale_hint_set
|
||||||
if (obj->layer->evas->engine.func->image_stride_get)
|
(obj->layer->evas->engine.data.output,
|
||||||
obj->layer->evas->engine.func->image_stride_get(obj->layer->evas->engine.data.output,
|
o->engine_data, o->scale_hint);
|
||||||
o->engine_data, &o->cur.image.stride);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2065,21 +2067,20 @@ evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hin
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (o->content_hint == hint) return;
|
if (o->content_hint == hint) return;
|
||||||
#ifdef EVAS_FRAME_QUEUING
|
#ifdef EVAS_FRAME_QUEUING
|
||||||
if (o->content_hint != hint)
|
if (o->engine_data)
|
||||||
{
|
evas_common_pipe_op_image_flush(o->engine_data);
|
||||||
if (o->engine_data)
|
|
||||||
evas_common_pipe_op_image_flush(o->engine_data);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
printf("content hint!!!!\n");
|
|
||||||
o->content_hint = hint;
|
o->content_hint = hint;
|
||||||
if (obj->layer->evas->engine.func->image_content_hint_set)
|
if (o->engine_data)
|
||||||
obj->layer->evas->engine.func->image_content_hint_set
|
{
|
||||||
(obj->layer->evas->engine.data.output,
|
if (obj->layer->evas->engine.func->image_content_hint_set)
|
||||||
o->engine_data, o->content_hint);
|
obj->layer->evas->engine.func->image_content_hint_set
|
||||||
if (obj->layer->evas->engine.func->image_stride_get)
|
(obj->layer->evas->engine.data.output,
|
||||||
obj->layer->evas->engine.func->image_stride_get(obj->layer->evas->engine.data.output,
|
o->engine_data, o->content_hint);
|
||||||
o->engine_data, &o->cur.image.stride);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -276,19 +276,13 @@ evas_gl_common_image_scale_hint_set(Evas_GL_Image *im, int hint)
|
||||||
void
|
void
|
||||||
evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint)
|
evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint)
|
||||||
{
|
{
|
||||||
printf("xxxx1\n");
|
|
||||||
if (im->content_hint == hint) return;
|
if (im->content_hint == hint) return;
|
||||||
im->content_hint = hint;
|
im->content_hint = hint;
|
||||||
printf("xxxx2\n");
|
|
||||||
if (!im->gc) return;
|
if (!im->gc) return;
|
||||||
printf("xxxx3\n");
|
|
||||||
if (!im->gc->shared->info.sec_image_map) return;
|
if (!im->gc->shared->info.sec_image_map) return;
|
||||||
printf("xxxx4\n");
|
|
||||||
if (!im->gc->shared->info.bgra) return;
|
if (!im->gc->shared->info.bgra) return;
|
||||||
printf("xxxx5\n");
|
|
||||||
// does not handle yuv yet.
|
// does not handle yuv yet.
|
||||||
if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return;
|
if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return;
|
||||||
printf("xxxx6\n");
|
|
||||||
if (im->content_hint == EVAS_IMAGE_CONTENT_HINT_DYNAMIC)
|
if (im->content_hint == EVAS_IMAGE_CONTENT_HINT_DYNAMIC)
|
||||||
{
|
{
|
||||||
if (im->cs.data)
|
if (im->cs.data)
|
||||||
|
|
|
@ -783,12 +783,19 @@ eng_image_alpha_set(void *data, void *image, int has_alpha)
|
||||||
re = (Render_Engine *)data;
|
re = (Render_Engine *)data;
|
||||||
if (!image) return NULL;
|
if (!image) return NULL;
|
||||||
im = image;
|
im = image;
|
||||||
|
if (im->alpha == has_alpha) return image;
|
||||||
if (im->native.data)
|
if (im->native.data)
|
||||||
{
|
{
|
||||||
im->alpha = has_alpha;
|
im->alpha = has_alpha;
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
eng_window_use(re->win);
|
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 */
|
/* FIXME: can move to gl_common */
|
||||||
if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return im;
|
if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return im;
|
||||||
if ((has_alpha) && (im->im->cache_entry.flags.alpha)) return image;
|
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;
|
return gim->content_hint;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static void
|
||||||
eng_image_stride_get(void *data, void *image)
|
eng_image_stride_get(void *data, void *image, int *stride)
|
||||||
{
|
{
|
||||||
Render_Engine *re = (Render_Engine *)data;
|
Render_Engine *re = (Render_Engine *)data;
|
||||||
Evas_GL_Image *im = image;
|
Evas_GL_Image *im = image;
|
||||||
if ((im->tex) && (im->tex->pt->dyn.img)) return im->tex->pt->dyn.w;
|
*stride = im->w;
|
||||||
return im->w;
|
if ((im->tex) && (im->tex->pt->dyn.img)) *stride = im->tex->pt->dyn.w;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue