Commit Graph

319 Commits

Author SHA1 Message Date
Vaxry 635a02d83f layer-shell: move to new impl
Also bumps the hw-s dep
2024-05-09 22:02:18 +01:00
Vaxry ed411f53bd cursor: move to a hyprland impl
This moves wlr_cursor to a completely new impl mostly under
CPointerManager

Also adds beginSimple to OpenGL for simple render passes (e.g. cursor)
2024-05-09 13:37:39 +01:00
Vaxry 1ed1ce9506
internal: new shared_ptr and weak_ptr implementation (#5883)
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.
2024-05-05 17:16:00 +01:00
Vaxry 5edc32930d layerSurface: refactor/move to a memory-safe impl
Makes all the pointers smart to avoid memory issues
Refactors layerSurface code to live inside desktop/layersurface
2024-04-30 02:41:27 +01:00
Vaxry bca7804bb6
internal: Window storage rework - part 1 (#5762)
* Window storage rework - part 1

* format

* remove useless include

* fix pch

* format

* fix crash in dwindle

* fix vram leak

* prefer .expired() for bool checks
2024-04-27 12:43:12 +01:00
Virt 9fe409800b
renderer: Fix mirrored displays when transformed and preserve aspect ratio (#5697)
* renderer: transform mirror buffer and preserve mirror aspect ratio

* renderer: render mirrors directly from offloadFB

* renderer: fix formatting

* renderer: use monitorMirrorFB again, but properly damage mirrors

* renderer: clean mirrors after reload and support cursor zoom mirroring
2024-04-24 16:29:41 +01:00
Vaxry 4ad739ec63 HookSystem: improve callback safety 2024-04-20 20:16:42 +01:00
Vaxry d605e47511 renderer: block screen shader on screencopy 2024-04-03 21:35:16 +01:00
Vaxry 93915502d2 blur: block modif only on no new optimize 2024-04-03 17:08:11 +01:00
Vaxry 91061a2084 opengl: fix modif in blur 2024-04-03 15:08:29 +01:00
Vaxry efdc1af044 renderer: some fixes for renderModif 2024-04-03 14:09:58 +01:00
Vaxry ef23ef60c5
Workspace/core: Refactor workspace storage (#5380)
* refactor workspaces to use ptrs

* clang-format
2024-04-02 20:32:39 +01:00
Vaxry ca17a89d86 renderer: allow blurring ls popups 2024-03-25 16:09:02 +00:00
jill ee00cb1dd8
opengl: report shader compilation errors from screen_shader (#5138)
* opengl: report shader compilation errors from screen_shader

* opengl: prefer .data()

* opengl: move shader error logging to logError

* opengl: quick glGetShaderiv -> glGetProgramiv fix

* opengl: typo fix

* opengl: format fixes

* opengl: minor compile fixes

* opengl: logError -> logShaderError
2024-03-21 14:46:23 +00:00
Vaxry 49f5fd59ad opengl: minor adjustment to getPreferredReadFormat
fixes #4791
2024-03-19 02:42:39 +00:00
Vaxry 7283dde878 screenShader: allow camel for screensize
ref #5059
2024-03-18 23:51:32 +00:00
Vaxry 5eb33ff4d8 screenshader: add screen_size uniform
fixes #5059
2024-03-18 16:35:22 +00:00
Vaxry 7587cadd0a renderer: add support for gles3.2 screen shaders 2024-03-18 04:15:04 +00:00
Vaxry 063708df26 config: improve config value infrastructure 2024-03-03 18:41:38 +00:00
Vaxry cc94123fa7 renderer: minor fixes to transformations 2024-03-03 02:18:06 +00:00
Julien Roy 2a08f2ba84
opengl: fix compilation on legacy renderer (#4928) 2024-03-03 00:31:36 +00:00
GartoxFR b2c3440477
animations: Refactor AnimatedVariable (#4911)
* animation: Refactor AnimatedVariable

This commit decomposes the AnimatedVariable class into a base class
with the common attribute to all variable types and a templated derived
type containing strongly typed info on the type being animated.

Access to the typed version is perfomed using the visitor pattern. A
utility is provided to build a visitor on the fly using lambdas.

Adding a new type to be animated should just be a matter of adding the
typed in the list defined by the ANIMABLE_TYPES macro

The size of the commit is justified by the API change in the
AnimatedVariable class. No more vec(), fl() or col() method but a unified
value() method.

* animation: Remove visitor pattern

* animation: Fix coding style

* animation: Fix coding style
2024-03-02 00:35:17 +00:00
Vaxry 4bc669f933 layers: add fully featured animations
Adds configs and layerrules to handle them

alas fixes #981

I have cooked
2024-02-28 15:00:40 +00:00
Vaxry bfb1e876a8 config: add opengl:force_introspection
fixes #4819
2024-02-23 21:21:24 +00:00
Vaxry ca59bd5739 opengl: check bottom/bg layers for required introspection
ref #4818
2024-02-23 21:09:47 +00:00
Vaxry 8c3613632a renderer: nuke lastFrameDamage and rework finalDamage
this fucking SUCKED
2024-02-23 01:02:32 +00:00
Vaxry c353b7c4f7 renderer: minor fixes for introspection detection 2024-02-22 23:01:22 +00:00
Hiram Muñoz dad8ffd576
renderer: Update splash text properties to be configurable (#4707)
* Update splash text properties to be configurable

The splash text's font and color properties have been updated to be configurable. This change includes adding new configuration values for the splash screen color and font. The rendering of the splash screen is also adjusted to use these new config values, allowing for easy customization of the splash text appearance.

* Updated to use Hyprlang config manager
2024-02-21 18:31:29 +00:00
Vaxry 13f6f0b923
Migrate the config to hyprlang (#4656)
* Migrate to hyprlang

* pop up errors

* fix swapped args

* Meson & Nix: build with hyprlang

* CI: add hyprlang to setup action

* add infra for plugin stuff

* fix hyprctl getoption

* fix hyprctl getoption with json

* format

* fix post parse logic

* fix autogen config

* oops missed exec-once

* fmt

* fix ws rules

* require 0.3.0 for hyprlang

* nix: flaek

* minor type fixes

* fix cfg usages in swipe

* use cvarlist for ws rules

* fix throw in addPluginConfigVar

* Nix: update hyprlang

* minor fixes

* fix disableLogs

* mention hyprlang docs

* bump hyprlang dep in cmake

* Meson: bump min hyprlang version

Nix: update hyprlang

* minor fix

* Nix: update meson patch

---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
2024-02-18 15:00:34 +00:00
JManch 1ed4f1cb25
screenshader: rename output uniform to wl_output (#4606)
* screenshader: rename output uniform to monitor

* rename to wl_output
2024-02-04 02:30:00 +00:00
Vaxry cf1886ca44 renderer: avoid unnecessary gpu resource deletions
fixes #4594
2024-02-02 15:36:13 +00:00
Vaxry d7514412d8 renderer: reset fb pointers after render pass
fixes #4590
2024-02-02 14:56:04 +00:00
Vaxry 2e3f0d5991 renderer: Add new background infrastructure
Adds new backgrounds from the winners of the contest
Rewrites how it works
Allows high color precision PNGs (RGB32F precisely)
Fixes a small bug in renderTextureInternalWithDamage
Nukes misc:force_hypr_chan
2024-01-29 23:11:00 +00:00
Vaxry 3e93fdf779 opengl: use texBox for rendering background texture
fixes #4543
2024-01-28 00:32:54 +00:00
Vaxry 72987dee88 opengl: rassert false on lost context
we do not have infra to deal with this. It will cause hyprland to freeze rendering, we might as well die.
2024-01-26 02:26:10 +00:00
Vaxry 6b92144f15 surface: avoid spam of window surfaces with scale and transform events
fixes #4408
2024-01-11 14:07:28 +01:00
Vaxry d7d333d162 opengl: apply box rot to projections 2024-01-07 18:51:08 +01:00
Vaxry f5b2fd2bc3 opengl: add renderdata.forceIntrospection 2024-01-07 18:37:02 +01:00
Vaxry 44ee9915e3 renderer: overhaul renderModifData 2024-01-07 18:35:44 +01:00
nmzik 53ce7992be
renderer: double lookup fix, input: double conversion fix (#4124) 2023-12-11 16:28:22 +00:00
nmzik efdf07e295
renderer: Allocate background texture only if required (#4111) 2023-12-10 16:53:08 +00:00
Vaxry 5489f9f07a renderer: use xray for background blur on small() surfaces
ref #4050
2023-12-06 20:17:40 +00:00
Vaxry c6804ccaab opengl: fixup blur dirty repaint conditions with solitary
fixes #4025
2023-12-05 00:43:09 +00:00
Vaxry 68783d904d screencopy: use buffer format for glReadPixels
fixes #4029
2023-12-04 03:52:54 +00:00
Vaxry e496b0f250 screencopy: fix detecting gl shm formats
ref #4029
2023-12-03 22:04:07 +00:00
Vaxry 80b9b21f9f opengl: fix nvidia read formats
fixes #4023
2023-12-02 14:51:45 +00:00
Vaxry 6e8b9ef7d8 opengl: fix swapped rgb drm formats 2023-12-01 17:23:50 +00:00
Vaxry 9c09f2a847 screencopy: fix shm exports with 10-bit
fixes #4019
2023-12-01 17:20:56 +00:00
Vaxry 9f2027be4b opengl: don't make a mirror buffer on fakeFrame 2023-11-30 10:15:02 +00:00
Vaxry 776f944619 opengl: fix missed makeEGLCurrent
fixes #3998
2023-11-30 02:19:27 +00:00