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

Support plugins #1266

Merged
merged 10 commits into from
May 25, 2024
Merged

Support plugins #1266

merged 10 commits into from
May 25, 2024

Conversation

yshui
Copy link
Owner

@yshui yshui commented May 23, 2024

No description provided.

@yshui yshui marked this pull request as ready for review May 23, 2024 05:26
@yshui yshui force-pushed the plugins branch 4 times, most recently from dfc5630 to 9b87c8f Compare May 23, 2024 05:40
Copy link

codecov bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 37.28814% with 148 lines in your changes are missing coverage. Please review.

Project coverage is 51.63%. Comparing base (9a83982) to head (d4b18d8).

Current head d4b18d8 differs from pull request most recent head fcfa63e

Please upload reports for the commit fcfa63e to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1266      +/-   ##
==========================================
- Coverage   51.64%   51.63%   -0.02%     
==========================================
  Files          59       59              
  Lines       13236    13349     +113     
==========================================
+ Hits         6836     6893      +57     
- Misses       6400     6456      +56     
Files Coverage Δ
src/common.h 48.27% <100.00%> (ø)
src/compiler.h 100.00% <ø> (ø)
src/config.h 25.00% <ø> (+1.47%) ⬆️
src/diagnostic.c 68.00% <100.00%> (+1.33%) ⬆️
src/backend/dummy/dummy.c 75.00% <75.00%> (ø)
src/backend/gl/glx.c 74.13% <75.00%> (+0.01%) ⬆️
src/backend/gl/egl.c 20.31% <66.66%> (+1.06%) ⬆️
src/opengl.c 0.00% <0.00%> (ø)
src/x.c 49.44% <33.33%> (-0.11%) ⬇️
src/backend/xrender/xrender.c 53.42% <57.14%> (+0.15%) ⬆️
... and 7 more

... and 2 files with indirect coverage changes

@yshui yshui force-pushed the plugins branch 3 times, most recently from 1d52f0d to fcfa63e Compare May 24, 2024 04:13
@codecov-commenter
Copy link

codecov-commenter commented May 24, 2024

Codecov Report

Attention: Patch coverage is 41.57895% with 222 lines in your changes are missing coverage. Please review.

Project coverage is 51.52%. Comparing base (8655f38) to head (bd26302).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1266      +/-   ##
==========================================
- Coverage   51.63%   51.52%   -0.12%     
==========================================
  Files          59       60       +1     
  Lines       13236    13400     +164     
==========================================
+ Hits         6835     6904      +69     
- Misses       6401     6496      +95     
Files Coverage Δ
include/picom/types.h 83.67% <ø> (ø)
src/backend/backend_common.c 21.15% <100.00%> (ø)
src/backend/gl/gl_common.c 64.52% <ø> (ø)
src/c2.c 56.70% <ø> (+0.26%) ⬆️
src/common.h 48.27% <100.00%> (ø)
src/compiler.h 100.00% <ø> (ø)
src/config.h 25.00% <ø> (+1.47%) ⬆️
src/diagnostic.c 68.00% <100.00%> (+1.33%) ⬆️
src/event.c 71.32% <ø> (ø)
src/log.h 76.47% <ø> (ø)
... and 22 more

Otherwise epoxy will fail with assertion error.

Signed-off-by: Yuxuan Shui <[email protected]>
@yshui yshui force-pushed the plugins branch 9 times, most recently from 829bd5b to 710ebef Compare May 25, 2024 10:07
yshui added 7 commits May 25, 2024 11:08
Instead of a fixed table, allow an arbitrary number of backends to be
registered through `backend_register`.

Slightly refactored configuration validation.

As a side-effect, you now have to explicitly specify a backend, because
due to the dynamic nature of backends, there is no way to choose a
default.

Signed-off-by: Yuxuan Shui <[email protected]>
It's unclear which functions a custom backend will need, let's be
conversative first.

Signed-off-by: Yuxuan Shui <[email protected]>
And add a pkgconfig file so they can be found.

Signed-off-by: Yuxuan Shui <[email protected]>
We want to change the backend interface as little as possible once we
release it as a public interface, so while we still can, we should try
to give it maximum flexibility.

Signed-off-by: Yuxuan Shui <[email protected]>
Allow loaded plugins to hook into specific backends.

Signed-off-by: Yuxuan Shui <[email protected]>
yshui added 2 commits May 25, 2024 11:08
The idea is to allow backend plugins to override backend functions by
modifying this table. Right now, when they do this they are actually
changing a global variable and their change will persist after backend
resets (!). Store the table inside backend_base solves this problem.

Signed-off-by: Yuxuan Shui <[email protected]>
@yshui yshui merged commit c282bb5 into next May 25, 2024
18 checks passed
@yshui yshui deleted the plugins branch May 25, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants