Seregon/StratoSDK

StratoSDK is a framework with a declarative approach similar to Flutter/React, written and designed entirely for Rust.

Rust/27.3 KB/No license
crates/strato-ui-renderer/src/platform/mac/rendering/metal/mod.rs
1pub mod frame_capture;
2mod renderer;
3mod renderer_manager;
4 
5pub use renderer_manager::RendererManager;
6 
7/// Returns `true` if the given metal Device corresponds to the low power/integrated GPU.
8///
9/// In dual GPU Macs, this is `false` for the discrete high-performance GPU.
10#[cfg_attr(wgpu, allow(dead_code))]
11pub fn is_integrated_gpu(device: &metal::Device) -> bool {
12 device.is_low_power() && !device.is_removable()
13}
14