Skip to content

Commit 8f3f32b

Browse files
committed
allow disable-gpu flag for windows
Signed-off-by: Andrei Gherghescu <[email protected]>
1 parent ad43939 commit 8f3f32b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

plotly_kaleido/src/lib.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,20 @@ impl Kaleido {
185185
) -> Result<String, Box<dyn std::error::Error>> {
186186
let p = self.cmd_path.to_str().unwrap();
187187

188+
#[cfg(target_os = "windows")]
189+
let cmd_args = vec![
190+
"plotly",
191+
"--disable-gpu",
192+
"--allow-file-access-from-files",
193+
"--disable-breakpad",
194+
"--disable-dev-shm-usage",
195+
"--disable-software-rasterizer",
196+
"--single-process",
197+
"--no-sandbox",
198+
];
188199
// Removed flag 'disable-gpu' as it causes issues on MacOS and other platforms
189200
// see Kaleido issue #323
201+
#[cfg(not(target_os = "windows"))]
190202
let cmd_args = vec![
191203
"plotly",
192204
"--allow-file-access-from-files",

0 commit comments

Comments
 (0)