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

Introduce geometry primitives #1862

Merged
merged 25 commits into from
May 7, 2024
Merged

Introduce geometry primitives #1862

merged 25 commits into from
May 7, 2024

Commits on Apr 25, 2024

  1. Introduce geometry primitives

    These are based on Eigen and will basically get compiled away into ideal
    representations for each platform conky is compiled for. This means that
    many operations can be SIMD optimized with very little effort.
    
    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    31da166 View commit details
    Browse the repository at this point in the history
  2. Add eigen dependency to workflows and nix flake

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    0605d98 View commit details
    Browse the repository at this point in the history
  3. Update wayland display to use geometry

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    e491612 View commit details
    Browse the repository at this point in the history
  4. Use discrete array type

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    a7c6fd1 View commit details
    Browse the repository at this point in the history
  5. Ensure component access always returns wanted type

    This should help avoid bad pointer reinterpretation.
    
    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    edc6390 View commit details
    Browse the repository at this point in the history
  6. Apply geometry to text bounds

    Also fixed bad previous substitutions. Will go through all of them at
    the end just in case, though this time I replaced them one component at
    a time.
    
    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    e0fa6c5 View commit details
    Browse the repository at this point in the history
  7. Revert unrelated codeql.yml changes

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    ce684cf View commit details
    Browse the repository at this point in the history
  8. Review all replaced variables and fix errors

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    cac4361 View commit details
    Browse the repository at this point in the history
  9. Add member access magic 🪄

    Added intermediate member access structures which map direct
    member access and mutation into indirect one as provided by eigen an
    most other representations. This should _almost_ always just work, but
    in some cases template specialization consuming these values might fail
    in which case dereferencing them should work.
    
    Sadly there's no way of providing `T&` access to values because actual
    data layout and representation can be wildly different between different
    architectures. Even if eigen wasn't being used, if we want to make use
    of SIMD we have to provide access through separate getters and setters.
    
    All this abstraction should be optimized away by the compiler, so it's
    just adding API ergonomics.
    
    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    ccf0cf6 View commit details
    Browse the repository at this point in the history
  10. Revert event changes

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    381c828 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2024

  1. Apply rect to workarea

    Removed screen_width/height as the functionality is covered by workarea.
    This deduplicates information as we don't care about actual screen size
    if workarea is set by xinerama.
    
    Also set workarea from wayland output geometry callback. It's used by
    conky.cc by both Wayland and X11, so this should be useful towards having
    that function update window position correctly on Wayland.
    
    Removed all X11 specific types from gui.h, as well as X11 imports. This
    only leaves X11 specific gui settings which is fine for now - though
    they should be moved to x11 headers once Wayland makes use of common
    ones that can be shared (i.e. we check which make sense to move).
    
    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    01db84e View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/main' into fix/screen-geometry

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    7d1ba74 View commit details
    Browse the repository at this point in the history
  3. Cleanup geometry.h

    - Added imports that would be missing without Eigen.
    - Made point & rect work better if Eigen::Array was replaced by std::array.
    - Removed templates around getters and setters.
    - Replaced internal _member_access with direct invocation.
    
    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    a48e117 View commit details
    Browse the repository at this point in the history
  4. Replace exceptions with UNREACHABLE

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    d4138de View commit details
    Browse the repository at this point in the history
  5. Add eigen to 3rdparty

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    e5f150e View commit details
    Browse the repository at this point in the history
  6. Flatten eigen submodule

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    e9ffdb5 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2024

  1. Remove eigen dependency

    Didn't use most eigen functionality anyway and it was only added for
    simple SIMD support. Decided to implement (WIP) SIMD instructions myself
    as we don't have any very advanced use cases.
    
    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    3fb7e53 View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/main' into fix/screen-geometry

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    cad6fb7 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. Improve SIMD impl

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    1ad1806 View commit details
    Browse the repository at this point in the history
  2. Undo CMake changes

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    bb232b0 View commit details
    Browse the repository at this point in the history
  3. Remove build.log from source tree

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    4ce7a58 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2024

  1. Add Vc dependency

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed May 5, 2024
    Configuration menu
    Copy the full SHA
    82aac1d View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/main' into fix/screen-geometry

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed May 5, 2024
    Configuration menu
    Copy the full SHA
    963552c View commit details
    Browse the repository at this point in the history
  3. Fix wayland build issues

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed May 5, 2024
    Configuration menu
    Copy the full SHA
    0223375 View commit details
    Browse the repository at this point in the history
  4. Replace SFINAE with static assertions

    Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
    Caellian committed May 5, 2024
    Configuration menu
    Copy the full SHA
    c22dba9 View commit details
    Browse the repository at this point in the history