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

Ensure Cesium is fast by default #8548

Merged
merged 1 commit into from
Jan 16, 2020
Merged

Ensure Cesium is fast by default #8548

merged 1 commit into from
Jan 16, 2020

Conversation

mramato
Copy link
Contributor

@mramato mramato commented Jan 16, 2020

  1. As per offline discussion, set useBrowserRecommendedResolution to true by default because otherwise many laptops and mobile devices with underpowered GPUs and high resolution screens run at an unusable FPS.

  2. Cesium now creates a WebGL context with a powerPreference value of high-performance to provide a hint to the browser that we would prefer to use the descrete GPU if it is available.

CC @kring @lilleyse

Fixes #8543

1. As per offline discussion, set `useBrowserRecommendedResolution` to
true by default because otherwise many laptops and mobile devices with
underpowered GPUs and high resolution screens run at an unusable FPS.

2. Cesium now creates a WebGL context with a `powerPreference` value of
`high-performance` to provide a hint to the browser that we would prefer
to use the descrete GPU if it is available.
@mramato mramato requested a review from lilleyse January 16, 2020 16:41
@cesium-concierge
Copy link

Thanks for the pull request @mramato!

  • ✔️ Signed CLA found.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@kring
Copy link
Member

kring commented Jan 16, 2020

LGTM. Anyone need to check anything in particular before we merge?

@lilleyse
Copy link
Contributor

Works on my dual-GPU mac. low-power is around 30 fps for a certain scene, high-performance is 59, and not setting it at all is 59.

Tested with Chrome Canary (81.0.4029.0).

@mramato
Copy link
Contributor Author

mramato commented Jan 16, 2020

@lilleyse What about Safari? I think "not at all" default to low-power there.

@mramato
Copy link
Contributor Author

mramato commented Jan 16, 2020

@kring no need to wait for @lilleyse's reply, I was just curious. This is ready

@kring kring merged commit 4c6a296 into master Jan 16, 2020
@kring kring deleted the fast-by-default branch January 16, 2020 19:03
@lilleyse
Copy link
Contributor

I got inconsistent results for Safari, all modes seemed to be low-power, but maybe I was doing something wrong.

gberaudo pushed a commit to swisstopo/swissgeol-viewer-app that referenced this pull request Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default to high performance context option?
4 participants