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

Make VideoStream aware of px_per_unit #4466

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

asinghvi17
Copy link
Member

@asinghvi17 asinghvi17 commented Oct 9, 2024

Description

Fixes #3961 by making VideoStream aware of px_per_unit settings. This assumes that:

  • All backends have px_per_unit (maybe this could be a get instead)

Type of change

Delete options that do not apply:

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Added an entry in CHANGELOG.md (for new features and breaking changes)
  • Added unit tests for new algorithms, conversion methods, etc.

@asinghvi17 asinghvi17 self-assigned this Oct 9, 2024
@MakieBot
Copy link
Collaborator

MakieBot commented Oct 9, 2024

Compile Times benchmark

Note, that these numbers may fluctuate on the CI servers, so take them with a grain of salt. All benchmark results are based on the mean time and negative percent mean faster than the base branch. Note, that GLMakie + WGLMakie run on an emulated GPU, so the runtime benchmark is much slower. Results are from running:

using_time = @ctime using Backend
# Compile time
create_time = @ctime fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @ctime Makie.colorbuffer(display(fig))
# Runtime
create_time = @benchmark fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @benchmark Makie.colorbuffer(fig)
using create display create display
GLMakie 5.07s (5.00, 5.14) 0.05+- 111.56ms (109.35, 114.61) 1.84+- 415.34ms (412.32, 425.96) 4.83+- 9.40ms (9.25, 9.59) 0.11+- 25.89ms (25.75, 26.08) 0.13+-
master 5.07s (5.03, 5.11) 0.03+- 110.78ms (109.25, 111.53) 0.74+- 415.27ms (412.13, 418.73) 2.58+- 9.29ms (8.41, 9.58) 0.39+- 25.96ms (25.78, 26.24) 0.17+-
evaluation 1.00x invariant, -0.0s (-0.08d, 0.88p, 0.04std) 0.99x invariant, 0.78ms (0.56d, 0.33p, 1.29std) 1.00x invariant, 0.07ms (0.02d, 0.97p, 3.71std) 0.99x invariant, 0.11ms (0.37d, 0.51p, 0.25std) 1.00x invariant, -0.07ms (-0.46d, 0.41p, 0.15std)
CairoMakie 4.73s (4.54, 4.83) 0.10+- 106.18ms (101.34, 109.65) 3.51+- 163.33ms (154.83, 173.12) 6.19+- 9.21ms (8.94, 9.53) 0.22+- 1.16ms (1.07, 1.22) 0.06+-
master 4.74s (4.53, 4.85) 0.14+- 106.83ms (100.83, 109.74) 3.60+- 162.57ms (152.66, 169.34) 6.75+- 9.24ms (8.78, 9.55) 0.26+- 1.13ms (1.08, 1.21) 0.06+-
evaluation 1.00x invariant, -0.01s (-0.11d, 0.85p, 0.12std) 1.01x invariant, -0.65ms (-0.18d, 0.74p, 3.55std) 1.00x invariant, 0.76ms (0.12d, 0.83p, 6.47std) 1.00x invariant, -0.03ms (-0.12d, 0.82p, 0.24std) 0.98x invariant, 0.02ms (0.42d, 0.44p, 0.06std)
WGLMakie 5.61s (5.29, 5.86) 0.22+- 122.33ms (109.73, 158.06) 16.84+- 5.77s (5.40, 6.27) 0.32+- 13.11ms (11.59, 14.05) 0.88+- 116.95ms (113.64, 119.86) 2.28+-
master 5.90s (5.61, 6.41) 0.33+- 117.81ms (110.21, 125.80) 6.40+- 5.32s (4.99, 5.98) 0.37+- 12.10ms (11.97, 12.40) 0.17+- 120.98ms (116.37, 128.72) 3.77+-
evaluation 1.05x noisy🤷‍♀️, -0.29s (-1.04d, 0.08p, 0.27std) 0.96x invariant, 4.51ms (0.35d, 0.53p, 11.62std) 0.92x slower❌, 0.45s (1.30d, 0.03p, 0.34std) 0.92x slower❌, 1.0ms (1.58d, 0.02p, 0.53std) 1.03x faster ✓, -4.03ms (-1.29d, 0.04p, 3.03std)

@asinghvi17 asinghvi17 marked this pull request as ready for review October 10, 2024 23:52
Copy link
Member

@SimonDanisch SimonDanisch left a comment

Choose a reason for hiding this comment

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

I think we should have a cross backend framebuffer_size(screen), that should be used here.
GLMakie already has that, which I extended to screen here:
#4485

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready to review
Development

Successfully merging this pull request may close these issues.

BoundsError in recordframe! with WGLMakie
3 participants