Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-23 12:11:27 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-23 13:04:24 +0300
commitf18e53745151eee946dcc01bc4b526994971daef (patch)
tree4694ed04ee9c9a4a509e6850ca1b65370c9a8444 /source/blender/editors/space_sequencer/sequencer_draw.c
parent846cac94db56ec1a51dea9f9e6d3138840741952 (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/space_sequencer/sequencer_draw.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 066ab3b1f23..bd4503dbe54 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -1529,11 +1529,7 @@ static void sequencer_stop_running_jobs(const bContext *C, Scene *scene)
static void sequencer_preview_clear(void)
{
- float col[3];
-
- UI_GetThemeColor3fv(TH_SEQ_PREVIEW, col);
- GPU_clear_color(col[0], col[1], col[2], 1.0f);
- GPU_clear(GPU_COLOR_BIT);
+ UI_ThemeClearColor(TH_SEQ_PREVIEW);
}
static void sequencer_preview_get_rect(rctf *preview,
@@ -2266,7 +2262,6 @@ void draw_timeline_seq(const bContext *C, ARegion *region)
else {
GPU_clear_color(col[0], col[1], col[2], 0.0f);
}
- GPU_clear(GPU_COLOR_BIT);
UI_view2d_view_ortho(v2d);
/* Get timeline boundbox, needed for the scrollers. */