Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Popover GPU acceleration on Windows. #179

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 14 additions & 1 deletion components/popover/popover-base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export class PopoverBase extends Component {
theme: {
backgroundColor: colors.white,
},
modifiers: {},
styleOverrides: {},
};

Expand Down Expand Up @@ -143,10 +144,22 @@ export class PopoverBase extends Component {
} = this.props;
const { showPopper } = this.state;

const popperModifiers = {
...modifiers,
computeStyle: {
...modifiers.computeStyle,
gpuAcceleration: !(
typeof window !== `undefined` &&
RobertBolender marked this conversation as resolved.
Show resolved Hide resolved
window.devicePixelRatio < 1.5 &&
/Win/.test(navigator.platform)
),
},
};

const popover = (
<Popper
placement={popoverPlacement}
modifiers={modifiers}
modifiers={popperModifiers}
eventsEnabled={eventsEnabled}
positionFixed={positionFixed}
>
Expand Down