[evas_gl_engine] fix dynamic texture bugs. ref count (rev.53027) and stride (rev...
authorGwanglim Lee <gl77.lee@samsung.com>
Mon, 4 Oct 2010 15:02:04 +0000 (00:02 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 4 Oct 2010 15:02:04 +0000 (00:02 +0900)
src/modules/engines/gl_common/evas_gl_texture.c
src/modules/engines/gl_x11/evas_engine.c [changed mode: 0644->0755]

index 92193ef..50f3de5 100644 (file)
@@ -685,6 +685,7 @@ evas_gl_common_texture_dynamic_new(Evas_GL_Context *gc, Evas_GL_Image *im)
         return NULL;
      }
    
+   tex->pt->references++;
    return tex;
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index ded1de4..de294af
@@ -1679,7 +1679,11 @@ eng_image_stride_get(void *data, void *image, int *stride)
    Render_Engine *re = (Render_Engine *)data;
    Evas_GL_Image *im = image;
    *stride = im->w;
-   if ((im->tex) && (im->tex->pt->dyn.img)) *stride = im->tex->pt->dyn.w;
+   if ((im->tex) && (im->tex->pt->dyn.img))
+     {
+        *stride = im->tex->pt->dyn.w * 4;
+        // FIXME: for other image formats (yuv etc.) different stride needed
+     }
 }
 
 static void