summaryrefslogtreecommitdiff
path: root/src/macros.hpp
Commit message (Collapse)AuthorAgeFilesLines
* config/lua: init lua config manager, use lua if available (#13817)Vaxry2026-04-261-1/+1
| | | Adds a new lua config manager, which will automatically be used if there is a lua config present.
* opengl: add debug:gl_debugging (#13183)Tom Englund2026-02-061-4/+7
| | | | | | | | | | | | | add debug:gl_debugging so we can disable gl debugging entirerly, both glGetError and enabling EGL_KHR_debug has its cost, we still have EXT_create_context_robustness and glGetGraphicsResetStatus that should catch context loss, and is generally cheap to call it only checks a flag set. glGetError might cause a implicit flush to get any pending calls sent to the gpu. however to get EGL_KHR_debug back enabled we now require a restart of the compositor after changing debug:gl_debugging
* debug: move to hyprutils' logger (#12673)Vaxry2025-12-181-7/+7
|
* desktop: cleanup, unify desktop elements as views (#12563)Vaxry2025-12-081-7/+0
|
* renderer: add more uniforms to the screen shader (#11986)Mozzarella322025-10-201-0/+3
| | | | | | | | | | | | These are: pointer_shape from the cursor-shape-v1 protocol prepared for v2, along with left_ptr...bottom_right_corner and killing (Hyprland specific) pointer_shape_previous with pointer_switch_time to blend between shapes pointer_size scaled size as used by the normal cursor pointer_pressed_positions[32] with pointer_pressed_times[32] and pointer_pressed_killed(32 bits) for click/touch animations and if they killed something pointer_inactive_timeout with pointer_last_active to smoothly fade the pointer out pointer_hidden to hide it when the cursor is hidden (excluding by cursor:invisible as this config value can be used to turn off the normal cursor, which is useful when drawing it with the screen shader)
* renderer: reduce a lot of glcalls and cache various states (#10757)Tom Englund2025-06-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * opengl: cache viewport state according to nvidia docs calling glViewPort unnecessarily on the same already set viewport is wasteful and can cause state changes when not needed. cache it in a struct and only call it when the viewport is actually changing. * opengl: cache glenable/gldisable state avoid making multiple glenable/gldisable calls on already set caps, can cause state changes and incur driver overhead. * opengl: cache glscissor box only call glscissor if the box actually has changed, try to avoid state changes. * opengl: cache gluniform calls cache the gluniform calls, the uniform values are cached in driver per program only the drawcalls setting the uniform yet again with the same value on same location is causing more overhead then caching it ourself and just no oping on it if no changes. * shader: rewrite handling of uniforms and state this is way faster as we don't need to mess with maps (hashing, etc) and instead can just use an array * opengl: stuff and 300 shaders * opengl: typo * opengl: get the uniform locations properly now that the legacy shaders are gone get the uniformlocations for SKIP_CM etc, so they can be properly set and used depending on if cm_enabled is set to false or true, before it was falling back to a legacy shader that didnt even have those uniforms. * opengl: check epsilon on float and remove extra glcall seems an extra unset glcall was added, remove it. and check the float epsilon on the glfloat. * opengl: remove instanced shader draw remove the instanced boolean from the vertex shader, might be neglible differences, needs more benchmark/work to see if its even worth it. * texture: cache texture paramaters parameters where occasionally set twice or more on same texture, short version wrap it and cache it. and move gpu churn to cpu churn. add a bind/unbind to texture aswell. * texture: use fast std::array caching cache the texparameter values in fast array lookups and incase we dont want it cached, apply it anyways. * shader: fix typo and hdr typo actually use Matrix4x2fv in the 4x2fv cache function, and send the proper float array for hdr. * texture: make caching not linear lookup make caching of texture params not linear. * minor style changes * opengl: revert drawarrays revert the mostly code style reduce loc change of drawarrays, and focus on the caching. its a if else case going wrong here breaking blur/contrast amongst others drawing. --------- Co-authored-by: Vaxry <vaxry@vaxry.net>
* internal: Fix compiler warnings (#9646)Lee Bousfield2025-03-171-0/+1
|
* protocols: Support content-type-v1 proto (#9226)UjinT342025-02-021-0/+1
|
* refactor: clang-tidy in compositor (#9241)Alexander2025-02-021-1/+2
| | | Co-authored-by: Alexandr Krylov <t@ruenya.nix>
* core: add LIKELY and UNLIKELY macrosvaxerski2025-01-171-0/+3
| | | | helps the compiler optimize
* core: cleanup header includes (#9088)user1111111111111111111111111111111112025-01-171-0/+1
| | | Cleanup some unneeded includes to speed up compilation
* internal: Make static analysis more happy (#8767)Ikalco2024-12-191-1/+2
| | | | | | | | | * make functions used in 1 file static * fix invalid substr param -1 * give default initializer to borderGradier * move RASSERT from printf to std::print
* core: move version include to hyprctlVaxry2024-12-051-2/+0
|
* internal: check size limit in layouts (#8298)MightyPlaza2024-10-301-0/+2
| | | | | | | | | | | modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/helpers/MiscFunctions.cpp modified: src/helpers/MiscFunctions.hpp modified: src/layout/DwindleLayout.cpp modified: src/layout/IHyprLayout.cpp modified: src/layout/MasterLayout.cpp modified: src/macros.hpp
* internal: introduce new types to avoid unsigned int rollover and signed int ↵Tom Englund2024-08-081-0/+2
| | | | | | | | | | | | | | | | | | | | overflow (#7216) * framebuffer: avoid gluint overflow GLuint was being initialized to -1 and rolling over to unsigned int max, its defined behaviour but very unnecessery. add a bool and use it for checking if allocated or not. * opengl: avoid gluint rollover -1 rolls over to unsigned int max, use 0xFF instead. * core: big uint64_t to int type conversion there were a few uint64_t to int implicit conversions overflowing int and causing UB, make all monitor/workspaces/windows use the new typedefs. also fix the various related 64 to 32 implicit conversions going around found with -Wshorten-64-to-32
* Core: Move to aquamarine (#6608)Vaxry2024-07-211-0/+5
| | | | | | | | | | | | | | Moves Hyprland from wlroots to aquamarine for the backend. --------- Signed-off-by: Vaxry <vaxry@vaxry.net> Co-authored-by: Mihai Fufezan <mihai@fufexan.net> Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Co-authored-by: vaxerski <vaxerski@users.noreply.github.com> Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com> Co-authored-by: Tom Englund <tomenglund26@gmail.com> Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com> Co-authored-by: diniamo <diniamo53@gmail.com>
* style: fix clang-formatVaxry2024-07-131-2/+1
|
* core: add ability to select previous workspace per monitor (#6598)Alexander2024-06-221-1/+2
| | | Co-authored-by: Крылов Александр <aleksandr.krylov@hyperus.team>
* core: Move to hyprutils for MathVaxry2024-06-191-0/+7
| | | | | | Moves CRegion, CBox and Vector2D over to hyprutils. Requires hyprutils>=0.1.4
* core: move to hyprutils for utils (#6385)Vaxry2024-06-111-3/+1
| | | | | | | | | | | | | * core: move to hyprutils for utils Nix: add hyprutils dep * Meson: add hyprutils dep * flake.lock: update --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* wayland/core: move to new impl (#6268)Vaxry2024-06-081-1/+11
| | | | | * wayland/core/dmabuf: move to new impl it's the final countdown
* compositor: fix getMonitorFromVector getting wrong monitor (#6010)Sungyoon Cho2024-05-111-1/+1
|
* internal: new shared_ptr and weak_ptr implementation (#5883)Vaxry2024-05-051-2/+2
| | | | | | | | | | | moves std::shared_ptrs to a new implementation Advantages: - you can dereference a weak_ptr directly. This will obviously segfault on a nullptr deref if it's expired. - this is useful to avoid the .lock() hell where we are 100% sure the pointer _should_ be valid. (and if it isn't, it should throw.) - weak_ptrs are still valid while the SP is being destroyed. - reasoning: while an object (e.g. CWindow) is being destroyed, its `weak_ptr self` should be accessible (the sp is still alive, and so is CWindow), but it's not because by stl it's already expired (to prevent resurrection) - this impl solves it differently. w_p is expired, but can still be dereferenced and used. Creating `s_p`s is not possible anymore, though. - this is useful in destructors and callbacks.
* internal: Window storage rework - part 1 (#5762)Vaxry2024-04-271-0/+4
| | | | | | | | | | | | | | | | | * Window storage rework - part 1 * format * remove useless include * fix pch * format * fix crash in dwindle * fix vram leak * prefer .expired() for bool checks
* macros: fix no pch warningVaxry2024-04-111-1/+0
|
* config: improve config value infrastructureVaxry2024-03-031-0/+1
|
* style/ci: apply clang-format and verify it in ci (#4039)François Conzelmann2023-12-061-7/+3
| | | | | * style: apply clang-format * ci: add new clang-format job to CI
* internal: replace INT_MAX with WORKSPACE_INVALIDVaxry2023-11-121-0/+2
|
* internal: better versioning (#3543)Vaxry2023-10-101-19/+8
| | | | | | | | | | | * better versioning * meson: better versioning * nix: better versioning --------- Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
* logging: implement std::formatter for some types (#3380)memchr2023-09-201-2/+26
|
* logging/format: use std::format_string to catch formatting string errors at ↵memchr2023-09-201-2/+2
| | | | | | | compile time (#3377) * fix(log): use constexpr format string * deprecate getFormat
* varlist: move to a separate header, add joinvaxerski2023-09-121-0/+2
|
* internal: Formatter rework (#3186)Vaxry2023-09-061-7/+3
|
* refactor: raise SIGABRT instead of write to null address (#3124)memchr2023-08-311-3/+4
|
* macros: fix missing includevaxerski2023-08-071-0/+1
|
* internal: cleanup headers in helpers/vaxerski2023-08-071-0/+77