Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
Auto merge of #137 - mstange:cherrypick-upstream-pr-894, r=jdm
Browse files Browse the repository at this point in the history
Specify the NSOpenGLPFAAllowOfflineRenderers attribute.

This commit is cherry-picked from the upstream PR rust-windowing#894 .

Without this attribute, on dual-GPU Macs, creating the context will always force a switch to the dedicated GPU. With this attribute, applications can opt in to using the integrated GPU by adding the `NSSupportsAutomaticGraphicsSwitching` key to their app bundle's Info.plist.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/137)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo authored Nov 29, 2017
2 parents e40b868 + 6510dd5 commit 4dbe444
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/api/cocoa/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ pub fn build_nsattributes<T>(pf_reqs: &PixelFormatRequirements, opengl: &GlAttri
NSOpenGLPFAAlphaSize as u32, alpha_depth as u32,
NSOpenGLPFADepthSize as u32, pf_reqs.depth_bits.unwrap_or(24) as u32,
NSOpenGLPFAStencilSize as u32, pf_reqs.stencil_bits.unwrap_or(8) as u32,
NSOpenGLPFAAllowOfflineRenderers as u32,
NSOpenGLPFAOpenGLProfile as u32, profile,
];

Expand Down

0 comments on commit 4dbe444

Please sign in to comment.