* 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.
        


SVN revision: 70125
This commit is contained in:
Carsten Haitzler 2012-04-12 08:01:13 +00:00
parent 67f7f6a2ae
commit 6a18b75743
5 changed files with 12 additions and 4 deletions

View File

@ -685,3 +685,10 @@
* 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.

View 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))

View 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))

View 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)
{

View 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,