pw = pt->w;
ph = pt->h;
+ // TIZEN_ONLY(20210125): use rotated texture
+ Evas_Image_Orient orient_tmp;
+ if (tex->im && tex->im->rotated_orient != EVAS_IMAGE_ORIENT_NONE)
+ {
+ orient_tmp = tex->im->orient;
+ tex->im->orient = EVAS_IMAGE_ORIENT_NONE;
+ }
+ //
+
if (tex->im &&
(tex->im->orient == EVAS_IMAGE_ORIENT_90))
{
if (!nomul)
PUSH_6_COLORS(pn, r, g, b, a);
+
+ // TIZEN_ONLY(20210125): use rotated texture
+ if (tex->im && tex->im->rotated_orient != EVAS_IMAGE_ORIENT_NONE)
+ {
+ tex->im->orient = orient_tmp;
+ }
+ //
}
void
//
}
+ // TIZEN_ONLY(20210125): use rotated texture
+ if (im1->rotated_orient != EVAS_IMAGE_ORIENT_NONE)
+ {
+ alpha = eng_image_alpha_get(re, im1);
+ gl_context = gl_generic_context_find(re, 1);
+ im2 = evas_gl_common_image_new_from_copied_data(gl_context, im1->w, im1->h, im1->im->image.data, alpha, im1->cs.space);
+ if (!im2 || !im2->im) goto on_error;
+ im2->rotated_orient = im1->orient;
+
+ pixels_in = im1->im->image.data;
+ pixels_out = im2->im->image.data;
+
+ if (!pixels_out || !pixels_in) goto on_error;
+
+ memcpy(pixels_out, pixels_in, sizeof (unsigned int) * im1->w * im1->h);
+ return im2;
+ }
+ //
+
w = im1->w;
h = im1->h;
rotate_image:
// rotate data for image save
+
+ // TIZEN_ONLY(20210125): use rotated texture
+ if (!tofree && im->rotated_orient != EVAS_IMAGE_ORIENT_NONE)
+ {
+ /* already rotated, do not have to rotate */
+ return im;
+ }
+ //
+
im_new = _rotate_image_data(engine, image);
if (!im_new)
{
}
*tofree = EINA_TRUE;
*image_data = im_new->im->image.data;
+
+ // TIZEN_ONLY(20210125): use rotated texture
+ im_new->orient = im->orient;
+ /* do not have to create texture here */
+ //
+
return im_new;
}
//TIZEN_ONLY
im_new->orient = orient;
- if (im->tex)
+
+ // TIZEN_ONLY(20210125): use rotated texture
+ /* do not keep rotated texture by increasing ref count
+ if the texture is rotated, then remove it. If it is not removed,
+ it does not match between texture orient and image orient */
+ if (im->tex && im->rotated_orient == EVAS_IMAGE_ORIENT_NONE)
+ //
{
im_new->tex = im->tex;
im_new->tex->references++;