diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-16 17:48:21 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-18 22:30:10 +0300 |
commit | 298329554a5a0ae40bc4a64ca9c1490d22edc947 (patch) | |
tree | c472a8a8f711e4de331b6cedafb9adc74014becd /source/blender/editors/interface | |
parent | bf1b622dd962416fef94ccb2f47878eced31e20d (diff) |
Cleanup: GPUState: remove double GPU_blend calls
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 9 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 2 |
2 files changed, 0 insertions, 11 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 8ebc8e60993..ba878be3dc7 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -752,7 +752,6 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(region), GPU_scissor(rect->xmin, rect->ymin, w, h); # endif - GPU_blend(GPU_BLEND_ALPHA); /* Combine with premultiplied alpha. */ GPU_blend(GPU_BLEND_ALPHA_PREMULT); @@ -781,8 +780,6 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(region), col); GPU_blend(GPU_BLEND_NONE); - /* Reset default. */ - GPU_blend(GPU_BLEND_ALPHA); # if 0 // restore scissortest @@ -925,7 +922,6 @@ void ui_draw_but_HISTOGRAM(ARegion *UNUSED(region), float h = BLI_rctf_size_y(&rect) * hist->ymax; GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); float color[4]; UI_GetThemeColor4fv(TH_PREVIEW_BACK, color); @@ -1068,7 +1064,6 @@ void ui_draw_but_WAVEFORM(ARegion *UNUSED(region), BLF_batch_draw_flush(); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); float color[4]; UI_GetThemeColor4fv(TH_PREVIEW_BACK, color); @@ -1096,7 +1091,6 @@ void ui_draw_but_WAVEFORM(ARegion *UNUSED(region), BLF_batch_draw_flush(); 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); @@ -1399,7 +1393,6 @@ void ui_draw_but_VECTORSCOPE(ARegion *UNUSED(region), float alpha = scopes->vecscope_alpha * scopes->vecscope_alpha * scopes->vecscope_alpha; GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); float color[4]; UI_GetThemeColor4fv(TH_PREVIEW_BACK, color); @@ -1956,7 +1949,6 @@ void ui_draw_but_CURVE(ARegion *region, uiBut *but, const uiWidgetColors *wcol, if (but->a1 == UI_GRAD_H) { /* grid, hsv uses different grid */ GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); ARRAY_SET_ITEMS(color_backdrop, 0, 0, 0, 48.0 / 255.0); immUniformColor4fv(color_backdrop); ui_draw_but_curve_grid(pos, rect, zoomx, zoomy, offsx, offsy, 0.1666666f); @@ -2460,7 +2452,6 @@ void ui_draw_but_TRACKPREVIEW(ARegion *UNUSED(region), int height = BLI_rctf_size_y(&rect); GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); /* need scissor test, preview image can draw outside of boundary */ int scissor[4]; diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index e946aec2176..5410eed9915 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2785,7 +2785,6 @@ static void widget_menu_back(uiWidgetColors *wcol, rcti *rect, int flag, int dir } GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); widget_softshadow(rect, roundboxalign, wcol->roundness * U.widget_unit); round_box_edges(&wtb, roundboxalign, rect, wcol->roundness * U.widget_unit); @@ -5164,7 +5163,6 @@ static void ui_draw_widget_back_color(uiWidgetTypeEnum type, if (use_shadow) { GPU_blend(GPU_BLEND_ALPHA); - GPU_blend(GPU_BLEND_ALPHA); widget_softshadow(rect, UI_CNR_ALL, 0.25f * U.widget_unit); GPU_blend(GPU_BLEND_NONE); } |