From 298329554a5a0ae40bc4a64ca9c1490d22edc947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sun, 16 Aug 2020 16:48:21 +0200 Subject: Cleanup: GPUState: remove double GPU_blend calls --- source/blender/editors/animation/anim_channels_defines.c | 1 - source/blender/editors/animation/anim_draw.c | 2 -- source/blender/editors/animation/anim_markers.c | 2 -- source/blender/editors/animation/time_scrub_ui.c | 1 - 4 files changed, 6 deletions(-) (limited to 'source/blender/editors/animation') diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 656ff844948..0a464e6709a 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -4387,7 +4387,6 @@ void ANIM_channel_draw( /* set blending again, as may not be set in previous step */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); /* step 1) draw backdrop ........................................... */ if (acf->draw_backdrop) { diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 0bebc25863b..73df0518f06 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -99,7 +99,6 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width) /* only draw this if preview range is set */ if (PRVRANGEON) { GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); @@ -133,7 +132,6 @@ void ANIM_draw_framerange(Scene *scene, View2D *v2d) { /* draw darkened area outside of active timeline frame range */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 5f755b9f4d9..3bfa3b9d5be 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -499,7 +499,6 @@ static void draw_marker( marker_color_get(marker, text_color, line_color); - GPU_blend(GPU_BLEND_ALPHA); GPU_blend(GPU_BLEND_ALPHA); draw_marker_line(line_color, xpos, UI_DPI_FAC * 20, region_height); @@ -528,7 +527,6 @@ static void draw_markers_background(rctf *rect) immUniformColor4ubv(shade); - GPU_blend(GPU_BLEND_ALPHA); GPU_blend(GPU_BLEND_ALPHA); immRectf(pos, rect->xmin, rect->ymin, rect->xmax, rect->ymax); diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c index 1690c9e3bba..0615e21c4a5 100644 --- a/source/blender/editors/animation/time_scrub_ui.c +++ b/source/blender/editors/animation/time_scrub_ui.c @@ -66,7 +66,6 @@ static void draw_background(const rcti *rect) immUniformThemeColor(TH_TIME_SCRUB_BACKGROUND); - GPU_blend(GPU_BLEND_ALPHA); GPU_blend(GPU_BLEND_ALPHA); immRectf(pos, rect->xmin, rect->ymin, rect->xmax, rect->ymax); -- cgit v1.2.3