diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2022-10-15 16:50:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 16:50:21 -0400 |
commit | a949740c942d69fba51b3cf3b5f1fd9dfc3a9c24 (patch) | |
tree | 54b1ef00831dbdbf0db7aef7780bee5b2bfcc200 /src/canvas/widgets/mem_basic.rs | |
parent | bd35bbdc9c539e035bc4bf91c799d85e566a6921 (diff) |
other: make gpu memory collection configurable (#835)
Follow-up to #794, this makes GPU memory collection toggleable.
Diffstat (limited to 'src/canvas/widgets/mem_basic.rs')
-rw-r--r-- | src/canvas/widgets/mem_basic.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/canvas/widgets/mem_basic.rs b/src/canvas/widgets/mem_basic.rs index 8f372eff..5e3d3d91 100644 --- a/src/canvas/widgets/mem_basic.rs +++ b/src/canvas/widgets/mem_basic.rs @@ -104,9 +104,10 @@ impl Painter { #[cfg(feature = "gpu")] { - let gpu_styles = &self.colours.gpu_colour_styles; - let mut color_index = 0; if let Some(gpu_data) = &app_state.converted_data.gpu_data { + let gpu_styles = &self.colours.gpu_colour_styles; + let mut color_index = 0; + gpu_data.iter().for_each(|gpu_data_vec| { let gpu_data = gpu_data_vec.points.as_slice(); let gpu_percentage = if let Some(gpu) = gpu_data.last() { |