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

feat: React to scale factor changes #606

Open
wants to merge 5 commits into
base: feat/bump-accesskit-winit-glutin
Choose a base branch
from

Conversation

marc2332
Copy link
Owner

@marc2332 marc2332 commented May 9, 2024

Closes #270
depends on #598

WIP

Copy link

github-actions bot commented May 9, 2024

Benchmark for d5c0bea

Click to view benchmark
Test Base PR %
benchmarks/alignments=true size=21845 depth=8 wide=4 mode=not cached 107.2±3.33ms 107.5±2.37ms +0.28%
benchmarks/size=100001 depth=2 wide=100000 mode=not cached 26.0±2.23ms 25.3±2.02ms -2.69%
benchmarks/size=10001 depth=2 wide=10000 mode=not cached 1404.4±54.85µs 1383.1±13.49µs -1.52%
benchmarks/size=1001 depth=2 wide=1000 mode=not cached 132.1±2.17µs 130.7±5.60µs -1.06%
benchmarks/size=131071 depth=17 wide=2 mode=not cached 25.1±1.10ms 25.6±1.26ms +1.99%
benchmarks/size=16383 depth=14 wide=2 mode=not cached 1688.9±110.72µs 2.4±0.37ms +42.10%
benchmarks/size=19531 depth=7 wide=5 mode=cached 321.8±13.50µs 402.2±44.64µs +24.98%
benchmarks/size=19531 depth=7 wide=5 mode=not cached 2.7±0.17ms 2.8±0.33ms +3.70%
benchmarks/size=4095 depth=12 wide=2 mode=not cached 397.7±82.01µs 404.2±59.67µs +1.63%
benchmarks/size=54241 depth=5 wide=15 mode=cached 347.4±127.79µs 259.9±26.43µs -25.19%
benchmarks/size=54241 depth=5 wide=15 mode=not cached 6.9±0.84ms 6.2±0.16ms -10.14%

Copy link

codecov bot commented May 9, 2024

Codecov Report

Attention: Patch coverage is 65.74074% with 37 lines in your changes are missing coverage. Please review.

Project coverage is 73.12%. Comparing base (15bb5e1) to head (1c75fd3).

Files Patch % Lines
crates/renderer/src/elements/rect.rs 0.00% 15 Missing ⚠️
crates/state/src/font_style.rs 40.00% 6 Missing ⚠️
crates/renderer/src/renderer.rs 0.00% 4 Missing ⚠️
crates/state/src/layout.rs 71.42% 4 Missing ⚠️
crates/renderer/src/app.rs 0.00% 3 Missing ⚠️
crates/renderer/src/render.rs 0.00% 3 Missing ⚠️
crates/renderer/src/elements/paragraph.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                         Coverage Diff                          @@
##           feat/bump-accesskit-winit-glutin     #606      +/-   ##
====================================================================
- Coverage                             73.19%   73.12%   -0.08%     
====================================================================
  Files                                   190      190              
  Lines                                 19201    19229      +28     
====================================================================
+ Hits                                  14054    14061       +7     
- Misses                                 5147     5168      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marc2332 marc2332 marked this pull request as ready for review May 9, 2024 16:33
Copy link

github-actions bot commented May 9, 2024

Benchmark for 095e910

Click to view benchmark
Test Base PR %
benchmarks/alignments=true size=21845 depth=8 wide=4 mode=not cached 106.1±1.26ms 105.2±0.94ms -0.85%
benchmarks/size=100001 depth=2 wide=100000 mode=not cached 23.3±1.53ms 23.2±1.27ms -0.43%
benchmarks/size=10001 depth=2 wide=10000 mode=not cached 1367.1±10.11µs 1368.4±18.32µs +0.10%
benchmarks/size=1001 depth=2 wide=1000 mode=not cached 131.7±1.70µs 129.7±1.43µs -1.52%
benchmarks/size=131071 depth=17 wide=2 mode=not cached 25.2±2.18ms 23.6±0.35ms -6.35%
benchmarks/size=16383 depth=14 wide=2 mode=not cached 1700.3±74.92µs 1629.9±35.28µs -4.14%
benchmarks/size=19531 depth=7 wide=5 mode=cached 315.7±10.27µs 314.6±7.80µs -0.35%
benchmarks/size=19531 depth=7 wide=5 mode=not cached 2.5±0.03ms 2.6±0.03ms +4.00%
benchmarks/size=4095 depth=12 wide=2 mode=not cached 399.4±116.52µs 399.5±130.17µs +0.03%
benchmarks/size=54241 depth=5 wide=15 mode=cached 261.9±31.86µs 262.7±26.72µs +0.31%
benchmarks/size=54241 depth=5 wide=15 mode=not cached 6.3±0.25ms 6.2±0.39ms -1.59%

Copy link

github-actions bot commented May 9, 2024

Benchmark for 6f8531a

Click to view benchmark
Test Base PR %
benchmarks/alignments=true size=21845 depth=8 wide=4 mode=not cached 105.5±0.90ms 108.1±0.92ms +2.46%
benchmarks/size=100001 depth=2 wide=100000 mode=not cached 25.8±1.05ms 26.8±1.26ms +3.88%
benchmarks/size=10001 depth=2 wide=10000 mode=not cached 1376.7±11.79µs 1384.4±11.09µs +0.56%
benchmarks/size=1001 depth=2 wide=1000 mode=not cached 130.1±1.13µs 130.2±2.93µs +0.08%
benchmarks/size=131071 depth=17 wide=2 mode=not cached 25.3±0.98ms 24.8±0.77ms -1.98%
benchmarks/size=16383 depth=14 wide=2 mode=not cached 1629.7±9.57µs 1624.7±7.75µs -0.31%
benchmarks/size=19531 depth=7 wide=5 mode=cached 331.9±15.40µs 339.7±18.37µs +2.35%
benchmarks/size=19531 depth=7 wide=5 mode=not cached 2.6±0.06ms 2.5±0.11ms -3.85%
benchmarks/size=4095 depth=12 wide=2 mode=not cached 396.4±135.22µs 398.3±148.24µs +0.48%
benchmarks/size=54241 depth=5 wide=15 mode=cached 339.9±56.57µs 272.2±20.09µs -19.92%
benchmarks/size=54241 depth=5 wide=15 mode=not cached 6.3±0.13ms 6.1±0.09ms -3.17%

@ZeroX-DG
Copy link
Contributor

Works great! Tho the massive example look differently on different scale.

On scale factor 1:
Screenshot 2024-05-10 at 7 58 29 PM

On scale factor 2:
Screenshot 2024-05-10 at 7 58 42 PM

@marc2332
Copy link
Owner Author

oh, I probably missed some parameter to scale :D

Was it like that before?

@ZeroX-DG
Copy link
Contributor

This is how it looks on main:

Scale factor 1:
Screenshot 2024-05-10 at 8 13 53 PM

Scale factor 2:
Screenshot 2024-05-10 at 8 14 05 PM

@marc2332
Copy link
Owner Author

Yeah, main looks good, I probably missed something on this PR :)

Copy link

Benchmark for 10d5336

Click to view benchmark
Test Base PR %
benchmarks/alignments=true size=21845 depth=8 wide=4 mode=not cached 104.6±0.50ms 105.4±0.91ms +0.76%
benchmarks/size=100001 depth=2 wide=100000 mode=not cached 23.6±0.90ms 23.9±1.67ms +1.27%
benchmarks/size=10001 depth=2 wide=10000 mode=not cached 1367.2±8.78µs 1384.6±32.46µs +1.27%
benchmarks/size=1001 depth=2 wide=1000 mode=not cached 129.4±1.06µs 130.1±0.90µs +0.54%
benchmarks/size=131071 depth=17 wide=2 mode=not cached 24.4±0.74ms 24.2±0.55ms -0.82%
benchmarks/size=16383 depth=14 wide=2 mode=not cached 1643.6±38.78µs 1629.7±66.09µs -0.85%
benchmarks/size=19531 depth=7 wide=5 mode=cached 309.4±3.26µs 315.6±10.09µs +2.00%
benchmarks/size=19531 depth=7 wide=5 mode=not cached 2.5±0.04ms 2.5±0.02ms 0.00%
benchmarks/size=4095 depth=12 wide=2 mode=not cached 396.5±59.65µs 397.1±129.40µs +0.15%
benchmarks/size=54241 depth=5 wide=15 mode=cached 250.8±37.46µs 243.0±14.86µs -3.11%
benchmarks/size=54241 depth=5 wide=15 mode=not cached 6.8±0.13ms 6.2±0.15ms -8.82%

@marc2332
Copy link
Owner Author

@ZeroX-DG That was actually not working well on main either, and it was because of a wrong usage of calc() in the massive.rs example, which I just fixed. Should work fine now :)

Copy link

Benchmark for 85a4569

Click to view benchmark
Test Base PR %
benchmarks/alignments=true size=21845 depth=8 wide=4 mode=not cached 104.7±0.63ms 112.7±0.85ms +7.64%
benchmarks/size=100001 depth=2 wide=100000 mode=not cached 22.0±0.59ms 22.4±1.09ms +1.82%
benchmarks/size=10001 depth=2 wide=10000 mode=not cached 1383.4±12.26µs 1376.6±13.43µs -0.49%
benchmarks/size=1001 depth=2 wide=1000 mode=not cached 129.4±2.03µs 131.2±7.02µs +1.39%
benchmarks/size=131071 depth=17 wide=2 mode=not cached 22.2±0.24ms 23.2±1.04ms +4.50%
benchmarks/size=16383 depth=14 wide=2 mode=not cached 1620.9±37.48µs 1676.2±38.38µs +3.41%
benchmarks/size=19531 depth=7 wide=5 mode=cached 309.9±1.84µs 314.3±17.59µs +1.42%
benchmarks/size=19531 depth=7 wide=5 mode=not cached 2.5±0.01ms 2.6±0.01ms +4.00%
benchmarks/size=4095 depth=12 wide=2 mode=not cached 398.9±104.37µs 407.5±97.50µs +2.16%
benchmarks/size=54241 depth=5 wide=15 mode=cached 242.6±10.96µs 249.2±139.62µs +2.72%
benchmarks/size=54241 depth=5 wide=15 mode=not cached 6.1±0.17ms 6.1±0.05ms 0.00%

@ZeroX-DG
Copy link
Contributor

Nice! Works like a charm now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔥 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants