From 027824714ef70f95b2c40167cc9487d3d7ec624e Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 31 Oct 2014 19:17:46 +1300 Subject: Code Cleanup: Remove some redundant operations --- source/blender/editors/gpencil/drawgpencil.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 078c0fc0427..3dfd66c0545 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -965,7 +965,6 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy, bool debug = (gpl->flag & GP_LAYER_DRAWDEBUG) ? true : false; short lthick = gpl->thickness; - float color[4], tcolor[4]; /* don't draw layer if hidden */ if (gpl->flag & GP_LAYER_HIDE) @@ -978,9 +977,6 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy, /* set color, stroke thickness, and point size */ glLineWidth(lthick); - copy_v4_v4(color, gpl->color); // just for copying 4 array elements - copy_v4_v4(tcolor, gpl->color); // additional copy of color (for ghosting) - glColor4fv(color); glPointSize((float)(gpl->thickness + 2)); /* apply xray layer setting */ @@ -1004,8 +1000,7 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy, } /* draw the strokes already in active frame */ - tcolor[3] = color[3]; - gp_draw_strokes(gpf, offsx, offsy, winx, winy, dflag, debug, lthick, tcolor, gpl->fill); + gp_draw_strokes(gpf, offsx, offsy, winx, winy, dflag, debug, lthick, gpl->color, gpl->fill); /* Draw verts of selected strokes * - locked layers can't be edited, so there's no point showing these verts @@ -1014,7 +1009,7 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy, /* XXX: perhaps we don't want to show these when users are drawing... */ if ((gpl->flag & GP_LAYER_LOCKED) == 0) { gp_draw_strokes_edit(gpf, offsx, offsy, winx, winy, dflag, - (gpl->color[3] < 0.95f) ? tcolor : NULL); + (gpl->color[3] < 0.95f) ? gpl->color : NULL); } /* Check if may need to draw the active stroke cache, only if this layer is the active layer -- cgit v1.2.3