From 17fc41fc52fbb6cc9ffade5a00a57f8cb6a87430 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 4 Aug 2021 15:26:48 -0700 Subject: [PATCH] add option to select alternative alpha blending I'm not sure if this is needed now that we have a single draw call, but based on the history and the nuance of different gl/driver/os quirks it feels like a good idea to keep this option in the back pocket. --- config/src/lib.rs | 3 +++ wezterm-gui/src/termwindow/render.rs | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config/src/lib.rs b/config/src/lib.rs index f2935a236..129a7977a 100644 --- a/config/src/lib.rs +++ b/config/src/lib.rs @@ -1195,6 +1195,9 @@ pub struct Config { #[serde(default)] pub pane_focus_follows_mouse: bool, + + #[serde(default)] + pub use_alternative_alpha_blending: bool, } impl_lua_conversion!(Config); diff --git a/wezterm-gui/src/termwindow/render.rs b/wezterm-gui/src/termwindow/render.rs index 7fc5ad9f0..43f314f16 100644 --- a/wezterm-gui/src/termwindow/render.rs +++ b/wezterm-gui/src/termwindow/render.rs @@ -543,8 +543,11 @@ impl super::TermWindow { atlas_linear_sampler: atlas_linear_sampler, foreground_text_hsb: foreground_text_hsb, }, - //&blend_but_set_alpha_to_one, - &alpha_blending, + if self.config.use_alternative_alpha_blending { + &blend_but_set_alpha_to_one + } else { + &alpha_blending + }, )?; vb.next_index();