summaryrefslogtreecommitdiff
path: root/src/protocols/ToplevelExport.cpp
Commit message (Collapse)AuthorAgeFilesLines
* protocols/toplevelExport: Support transparency in toplevel export (#12824)ArchSav2026-01-201-4/+6
|
* renderer: optimise shader usage further, split shaders and add more caching ↵Tom Englund2026-01-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#12992) * shader: split CM rgba/rgbx into discard ones make it branchless if we have no discards. * shader: ensure we dont stall on vbo uv buffer if we render a new texture before the previous was done gpu wise its going to stall until done, call glBufferData to orphan the data. this allows the driver to return a new memory block immediately if the GPU is still reading from the previous one * protocols: ensure we reset GL_PACK_ALIGNMENT reset GL_PACK_ALIGNMENT back to the default initial value of 4 * shader: use unsigned short in VAO loose a tiny bit of precision but gain massive bandwidth reductions. use GL_UNSIGNED_SHORT and set it as normalized. clamp and round the UV for uint16_t in customUv. * shader: interleave vertex buffers use std::array for fullverts, use a single interleaved buffer for position and uv, should in theory improve cache locality. and also remove the need to have two buffers around. * shader: revert precision drop we need the float precision because we might have 1.01 or similiar floats entering CM shader maths, and rounding/clamping those means the maths turns out wrong. so revert back to float, sadly higher bandwidth usage. * update doColorManagement api * convert primaries to XYZ on cpu * remove unused primaries uniform --------- Co-authored-by: UjinT34 <ujint34@mail.ru>
* renderer/gl: add internal gl formats and reduce internal driver format ↵Tom Englund2026-01-071-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conversions (#12879) * format: add internal formats for drm formats cross referenced with weston and added internal formats and types for a lot of missing ones. also added a isFormatYUV helper. * framebuffer: ensure we use right internalformat ensure we use the right internal format to avoid internal driver blitting, also since we only attach the GL_STENCIL_ATTACHMENT we might just aswell only use the GL_STENCIL_INDEX8 to not confuse drivers that we want a depth aswell. * texture: use external on yuv or non linear mods using external makes us use the gpu's internal detiler. and this is makes intel a lot happier then having to format convert it to a linear format internally. * shaders: add external support to CM frag add external support to CM frag, and correct ext.frag typo. * formats: remove duplicates and fix a typo in cm.frag remove duplicate formats and a typo in cm.frag * formats: add swizzle logic to all formats add swizzle logic from weston for all formats and use it in shm texture paths. * format: more format changes use monitor drm format instead of forcing something different. * shader: remove external from cm.frag drivers want this resolved at compiletime cant use both samplerExternalOES and sampler2d and then runtime branch it. * screencopy: swizzle textures in screencopy swizzle textures in screencopy, to get the right colors when copying. * screencopy: restore old behaviour try restore old behaviour before the gles3 format changes. glReadPixels had the wrong format, so i went to far trying to mitigate it. should be like before now.
* rules/windowRuleApplicator: fix min/max size effects (#12491)Vaxry2025-12-271-1/+1
| | | fixes #12412
* debug: move to hyprutils' logger (#12673)Vaxry2025-12-181-10/+10
|
* desktop: cleanup, unify desktop elements as views (#12563)Vaxry2025-12-081-3/+7
|
* windowrules: rewrite completely (#12269)Vaxry2025-11-171-2/+2
| | | | | | | Reworks the window rule syntax completely --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* screencopy: add force 8 bit to fix 10b screensharing (#11623)Vaxry2025-09-081-1/+1
| | | ref https://github.com/hyprwm/xdg-desktop-portal-hyprland/issues/270
* refactor: Use new hyprutils casts (#11377)Kamikadze2025-08-141-5/+5
|
* opengl: improve render fn arg clarity (#11286)Vaxry2025-07-311-2/+2
|
* windowrules: Add noscreenshare (#10482)Kamikadze2025-05-271-7/+10
|
* core: drop the legacy renderer (#10408)Tom Englund2025-05-151-6/+0
| | | | | | | | | | | * core: drop the legacy renderer the legacy renderer is broken and barely used, drop it. * Nix: drop support for legacyRenderer --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* render: refactor class member vars (#10292)davc0n2025-05-051-9/+7
| | | | | * render: refactor class member vars * render: fix clang format
* protocols: refactor class member vars (n-t) (#10273)davc0n2025-05-041-126/+126
|
* protocols: refactor class member vars (types) (#10261)davc0n2025-05-031-5/+5
|
* managers: refactor class member vars (#10242)davc0n2025-05-021-1/+1
|
* helpers: refactor class member vars (#10218)davc0n2025-04-301-23/+23
|
* windows: refactor class member vars (#10168)davc0n2025-04-281-10/+10
|
* time: move to stl's clocks and move timerVaxry2025-04-161-12/+10
|
* Permission Manager: add permission management for screencopy (#9930)Vaxry2025-04-081-14/+34
|
* core: refactor and improve surface commit (#9805)Ikalco2025-04-071-9/+2
| | | | | | | | | | | | | | | | | | | | | | | * make CHLBufferReference not a SP anymore * copy over release and acquire points in CHLBufferReference * use CHLBufferReference in screencopy and toplevel export TODO: use CHLBufferReference in direct scanout properly the only problem is the scanout buffer release timing, specifically the onBackendRelease mechanism * cleanup SSurfaceState and surface pending commit tracking * move surface code from DRMSyncobj, and move acquire to SSurfaceState * use queue for comitted pending surface states like proto says "The content update is placed in a queue until it becomes active." - wl_surface::commit * drop, not release, prev buffer if 2nd buffer wl_surface.attach is sent "A wl_buffer that has been attached and then replaced by another attach instead of committed will not receive a release event, and is not used by the compositor." - wl_surface::attach
* renderer: various fixes towards improving gpu calls robustness (#9188)Tom Englund2025-02-081-0/+6
| | | | | | | | | | | | | | ensure framebuffer textures are detached and deleted, avoid leaving framebuffers bound when not needed * render: avoid calling glDeleteProgram on no program its safe to do so but it adds a bunch of unnecessery lines in apitrace when tracing. if guard it and return early. * opengl: ensure texture and buffers are unbound ensure bound buffers are unbound after use, also detach textures from framebuffer before deleting it otherwise it will become dangling and essentially leak.
* toplevelexport: fix transformed origin for shm buffers (#9343)WhySoBad2025-02-061-1/+24
| | | | | * toplevelexport: fix transformed origin for shm buffers * toplevelexport: fix style nits
* protocols: do not destroy screencopy resources before client request (#9048)outfoxxed2025-01-191-6/+0
|
* core: reserve vector sizes as much as we can (#9118)Tom Englund2025-01-191-0/+2
| | | | | avoid reallocations as much as possible with a few edge cases where the reservation overshoots a tiny bit. but a few bytes of memory short term is better used then the overhead of potential reallocation.
* core: add LIKELY and UNLIKELY macrosvaxerski2025-01-171-15/+14
| | | | helps the compiler optimize
* core: cleanup header includes (#9088)user1111111111111111111111111111111112025-01-171-0/+3
| | | Cleanup some unneeded includes to speed up compilation
* protocols: immediately copy toplevel content when ignoreDamage set (#9049)outfoxxed2025-01-141-2/+7
| | | Also sets m_ignoreDamage, as it wasn't set before.
* protocols: allow hyprland-toplevel-export to capture hidden windows (#9041)outfoxxed2025-01-121-2/+2
|
* protocols: do not capture cursor in toplevel without pointer focus (#9042)outfoxxed2025-01-121-1/+20
|
* core: move parts of the animation system to hyprutils (#8868)Maximilian Seidler2025-01-071-4/+4
| | | | | | | | | | | | | * core: change animation manager to use Hyprutils::Animation * config: move animation config to hyprutils animation tree * use g_pAnimationManager->createAnimation and the new PHLANIMVAR template * core: use CGenericAnimatedVariabled::{enabled,setConfig,getStyle} and adapt callbacks * core: adapt animated variable usage (dereference the shared pointer) * misc: bump CMakeLists to hyprutils 0.3.3
* core: Add clang-tidy (#8664)Vaxry2024-12-071-4/+4
| | | | | This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright.
* core: move colorspace handling to oklab (#8635)Vaxry2024-12-031-2/+2
| | | | | | | | | | | * Meson: add hyprgraphics * Nix: add hyprgraphics * CI/setup_base: get hyprgraphics-git --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* renderer: improve api around new framebuffer changesVaxry2024-11-021-1/+1
| | | | ref #8325
* core: move internal structures to monitor pointers (#8266)Vaxry2024-10-271-4/+4
|
* internal: Move CMonitor to SP (#8178)Vaxry2024-10-191-1/+1
| | | | | * move monitors to sp * XD
* screencopy: fix screencopy frames not being cleaned up (#8017)Ikalco2024-10-081-5/+11
| | | | | --------- Co-authored-by: Vaxry <vaxry@vaxry.net>
* misc: constify the remaining for loops (#7534)Tom Englund2024-08-261-3/+3
| | | now we roll loops at blazing constified speed.
* screencopy: fixup 10-bit sharing via shm on nvidiavaxerski2024-08-231-1/+1
|
* protocols: refactor protocol logging to a macro (#7324)Tom Englund2024-08-151-2/+0
| | | | | | this avoids the usage of the unique_ptr PROTO::protocol before it has been constructed incase one wants to log something inside the constructor itself, move the logging to macros and print file:linenumber on ERR,CRIT,WARN and classname on the rest of the levels.
* protocols: move screencopy and toplevel export to hyprwayland-scanner (#7065)Ikalco2024-07-271-271/+229
| | | | | * move screencopy and toplevel export to hyprwayland-scanner * oops
* core: Properly shutdown wl display (#7018)Ikalco2024-07-241-1/+8
| | | | | | | * correctly destroy wayland globals * properly shutdown and cleanup hyprland * appease the nitpick gods and some comments
* debug: get rid of useless 1s in logs (#6969)Ikalco2024-07-221-1/+1
| | | | | * get rid of 1s in logs lol * replace WLR with AQ in logs
* Core: Move to aquamarine (#6608)Vaxry2024-07-211-13/+6
| | | | | | | | | | | | | | 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>
* toplevelexport: fix flipped r/b channels when sharing windows (#6861)David De Sousa2024-07-131-1/+2
| | | fixes #6823
* core: Move to hyprutils for MathVaxry2024-06-191-1/+1
| | | | | | Moves CRegion, CBox and Vector2D over to hyprutils. Requires hyprutils>=0.1.4
* wayland/core: move to new impl (#6268)Vaxry2024-06-081-37/+26
| | | | | * wayland/core/dmabuf: move to new impl it's the final countdown
* toplevelexport: avoid locking software cursors during renderVaxry2024-06-031-5/+5
| | | | | | this may trigger a render begin/end and fuck up the pass fixes #6277
* cursor: move to a hyprland implVaxry2024-05-091-7/+12
| | | | | | | This moves wlr_cursor to a completely new impl mostly under CPointerManager Also adds beginSimple to OpenGL for simple render passes (e.g. cursor)
* internal: new shared_ptr and weak_ptr implementation (#5883)Vaxry2024-05-051-4/+4
| | | | | | | | | | | 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.