diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-23 12:11:27 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-23 13:04:24 +0300 |
commit | f18e53745151eee946dcc01bc4b526994971daef (patch) | |
tree | 4694ed04ee9c9a4a509e6850ca1b65370c9a8444 /source/blender/editors/screen/area.c | |
parent | 846cac94db56ec1a51dea9f9e6d3138840741952 (diff) |
Cleanup: GPU: Use explicit clear value in GPU_clear* commands
This replace `GPU_clear()` by `GPU_clear_color()` and `GPU_clear_depth()`.
Since we always set the clear value before clearing, it is unecessary
to track the clear color state.
Moreover, it makes it clearer what we clear the framebuffer to.
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r-- | source/blender/editors/screen/area.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 80fa5a7815d..921cc92299e 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -351,11 +351,9 @@ static void region_draw_status_text(ScrArea *area, ARegion *region) if (overlap) { GPU_clear_color(0.0f, 0.0f, 0.0f, 0.0f); - GPU_clear(GPU_COLOR_BIT); } else { UI_ThemeClearColor(TH_HEADER); - GPU_clear(GPU_COLOR_BIT); } int fontid = BLF_set_default(); @@ -519,7 +517,6 @@ void ED_region_do_draw(bContext *C, ARegion *region) if (area && area_is_pseudo_minimized(area)) { UI_ThemeClearColor(TH_EDITOR_OUTLINE); - GPU_clear(GPU_COLOR_BIT); return; } /* optional header info instead? */ @@ -2529,11 +2526,9 @@ static void region_clear_color(const bContext *C, const ARegion *region, ThemeCo float back[4]; UI_GetThemeColor4fv(colorid, back); GPU_clear_color(back[3] * back[0], back[3] * back[1], back[3] * back[2], back[3]); - GPU_clear(GPU_COLOR_BIT); } else { UI_ThemeClearColor(colorid); - GPU_clear(GPU_COLOR_BIT); } } |