summaryrefslogtreecommitdiff
path: root/src/protocols/Screencopy.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | fixes #12412
* debug: move to hyprutils' logger (#12673)Vaxry2025-12-181-22/+22
|
* desktop: cleanup, unify desktop elements as views (#12563)Vaxry2025-12-081-4/+4
|
* windowrules: rewrite completely (#12269)Vaxry2025-11-171-3/+3
| | | | | | | Reworks the window rule syntax completely --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* screencopy: fix possible crash in renderMon()Vaxry2025-11-121-1/+2
|
* renderer: fix noscreenshare layerrule popups (#12260)usering-around2025-11-111-17/+23
|
* screencopy: wait longer to re-enable DS (#12135)Dominick DiMaggio2025-10-261-0/+4
|
* renderer: add "noscreenshare" layer rule (#11664)0xFMD2025-09-221-0/+16
|
* 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
* protocols: Fix fading out windows with noscreenshare being visible (#11457)Kamikadze2025-08-171-2/+3
|
* refactor: Use new hyprutils casts (#11377)Kamikadze2025-08-141-7/+7
|
* screencopy: multiply box pos by scaleVaxry2025-08-031-1/+1
| | | | fixes #11299
* screencopy: avoid crash on cm disabledVaxry2025-08-021-1/+1
| | | | | | fixes #11310 closes #11312
* screencopy: un-hdr screencopy buffers for cm-unaware clients (#11294)Vaxry2025-07-311-4/+15
|
* opengl: improve render fn arg clarity (#11286)Vaxry2025-07-311-7/+7
|
* ci: correct tar command for xz compression & fix typos (#11213)xqso2025-07-251-2/+2
|
* screencopy: ignore hidden windows in noscreenshareVaxry2025-07-121-0/+3
| | | | fixes #11002
* screencopy: fix improper box calculations for transforms (#10870)Vaxry2025-06-281-3/+5
|
* opengl: use a stack for storing monitor transform enabledVaxry2025-06-151-2/+2
| | | | fixes #10487
* screencopy: fix incorrect noscreenshare positions with monitor scaling (#10674)Kamikadze2025-06-081-8/+5
|
* renderer: fix incorrect cursor position when screencopy region with monitor ↵Kamikadze2025-06-081-1/+1
| | | | scaling (#10675)
* screencopy: fix applying `noscreenshare` to invisible special workspaces ↵XPhyro2025-06-051-1/+1
| | | | (#10628)
* windowrules: Add noscreenshare (#10482)Kamikadze2025-05-271-0/+54
|
* screencopy: store a fb before permission popup if the permission is pending ↵Vaxry2025-05-171-25/+54
| | | | | (#10455) stops rendering the permission popup on stuff like grim when it asks
* core: drop the legacy renderer (#10408)Tom Englund2025-05-151-8/+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-12/+10
| | | | | * render: refactor class member vars * render: fix clang format
* protocols: refactor class member vars (n-t) (#10273)davc0n2025-05-041-132/+132
|
* protocols: refactor class member vars (types) (#10261)davc0n2025-05-031-5/+5
|
* protocols: refactor class member vars (core) (#10259)davc0n2025-05-031-1/+1
|
* helpers: refactor class member vars (#10218)davc0n2025-04-301-13/+13
|
* render: properly release rendered buffers (#9807)Ikalco2025-04-301-14/+4
| | | | | | | | | * cleanup eglSync * properly release buffers in renderer * add renderingDoneCallback and use it in screencopy * use static constructor for CEGLSync
* screencopy: don't render cursor when frame doesn't want itVaxry2025-04-291-4/+6
|
* screencopy: support hw cursors while sharing with cursorVaxry2025-04-281-25/+6
|
* compositor: refactor class member vars (#10141)davc0n2025-04-221-2/+2
|
* time: move to stl's clocks and move timerVaxry2025-04-161-6/+8
|
* screencopy: Handle explicit sync failure (#10050)Lee Bousfield2025-04-121-9/+10
|
* Permission Manager: add permission management for screencopy (#9930)Vaxry2025-04-081-18/+47
|
* 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
* screencopy, render: Use explicit sync for screencopy (#9697)Lee Bousfield2025-03-221-22/+37
| | | | | | | * screencopy, render: Use explicit sync for screencopy * screencopy: Check if explicit sync is enabled * screencopy: Don't require explicit KMS enabled
* 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.
* renderer/internal: stop using box pointersVaxry2025-01-261-2/+2
| | | | in favor of const refs
* protocols: do not destroy screencopy resources before client request (#9048)outfoxxed2025-01-191-4/+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-9/+8
| | | | helps the compiler optimize
* core: cleanup header includes (#9088)user1111111111111111111111111111111112025-01-171-0/+4
| | | Cleanup some unneeded includes to speed up compilation
* core: Add clang-tidy (#8664)Vaxry2024-12-071-6/+6
| | | | | This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright.
* screencopy: fix build with legacyrendererVaxry2024-11-051-1/+1
| | | | fixes #8355
* renderer: improve api around new framebuffer changesVaxry2024-11-021-1/+1
| | | | ref #8325