* Fix gl engine clipping bug when rendering to evas map fbo's
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 Apr 2012 08:01:13 +0000 (08:01 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 Apr 2012 08:01:13 +0000 (08:01 +0000)
        when gl window buffer is smaller than the fbo. used wrong
        surface size in clipping logic.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@70125 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/modules/engines/gl_common/evas_gl_font.c
src/modules/engines/gl_common/evas_gl_image.c
src/modules/engines/gl_common/evas_gl_polygon.c
src/modules/engines/gl_common/evas_gl_rectangle.c

index 7bf3866..832b34e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
        * Box layouts: fix handling of weights that have decimal parts,
        they were being handled as "int" where "double" was expected.
+
+2012-04-12  Carsten Haitzler (The Rasterman)
+
+        * Fix gl engine clipping bug when rendering to evas map fbo's
+        when gl window buffer is smaller than the fbo. used wrong
+        surface size in clipping logic.
+
index e5f3a4a..bd20575 100644 (file)
@@ -162,7 +162,7 @@ evas_gl_font_texture_draw(void *context, void *surface __UNUSED__, void *draw_co
      }
    /* save out clip info */
    c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h;
-   evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h);
+   evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->shared->w, gc->shared->h);
    evas_common_draw_context_clip_clip(gc->dc, x, y, tex->w, tex->h);
    /* our clip is 0 size.. abort */
    if ((gc->dc->clip.w <= 0) || (gc->dc->clip.h <= 0))
index 1d4b1f8..39f16bb 100644 (file)
@@ -880,7 +880,7 @@ evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx,
 
    /* save out clip info */
    c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h;
-   evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h);
+   evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->shared->w, gc->shared->h);
    evas_common_draw_context_clip_clip(gc->dc, dx, dy, dw, dh);
    /* our clip is 0 size.. abort */
    if ((gc->dc->clip.w <= 0) || (gc->dc->clip.h <= 0))
index 06647cd..bc111bd 100644 (file)
@@ -248,7 +248,7 @@ evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_Polygon *poly, int
    free(point);
    free(sorted_index);
 
-   evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h);
+   evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->shared->w, gc->shared->h);
 
    if (spans)
      {
index 1903314..6254d87 100644 (file)
@@ -17,8 +17,9 @@ evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, int x, int y, int w, int h)
    cr = (gc->dc->col.col >> 16) & 0xff;
    cg = (gc->dc->col.col >> 8 ) & 0xff;
    cb = (gc->dc->col.col      ) & 0xff;
-   evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h);
+   evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->shared->w, gc->shared->h);
    /* no cutouts - cut right to the chase */
+
    if ((gc->dc) && (gc->dc->clip.use))
      {
         RECTS_CLIP_TO_RECT(x, y, w, h,