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

Add support for browser density #75

Merged
merged 2 commits into from
Aug 1, 2022
Merged

Add support for browser density #75

merged 2 commits into from
Aug 1, 2022

Conversation

MortimerGoro
Copy link
Contributor

@MortimerGoro MortimerGoro commented Mar 18, 2022

This PRs adds support for using a different density to render a WSession. Historically we have been using 1.0 because GeckoSession handled it internally but as we integrate new backends there is a difference in sizes between the pixel size and the browser dpi/point size, leading to really small browser viewports with 1.0.

One complexity added with this change is that in the WindowWidget we relied on a surface size change caused by different densities between the UI and the browser to generate new Surfaces when switching between the Browser Display and the custom Library UI (bookmarks, history, etc) that are shown on the same quad. We need to force a new surface creation when using layers if the densities between both are equal.

It's being called from 2 different places. Unifying the call in a single
private method is less error prone and easier to maintain.
Copy link
Member

@svillar svillar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@svillar svillar merged commit 459e2f6 into main Aug 1, 2022
@svillar svillar deleted the mortimer/browser_density branch August 1, 2022 11:57
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.

None yet

2 participants