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

Rounded corners for legacy xrender backend #551

Merged
merged 5 commits into from
Nov 30, 2020

Conversation

yshui
Copy link
Owner

@yshui yshui commented Nov 29, 2020

Part of #480 and #229

@yshui yshui force-pushed the rounded-corners-legacy-xrender branch from 1729164 to 4bd612d Compare November 29, 2020 21:56
@codecov
Copy link

codecov bot commented Nov 29, 2020

Codecov Report

Merging #551 (cb41ea9) into next (fb38bf0) will decrease coverage by 0.23%.
The diff coverage is 19.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next     #551      +/-   ##
==========================================
- Coverage   38.21%   37.98%   -0.24%     
==========================================
  Files          46       46              
  Lines        9056     9186     +130     
==========================================
+ Hits         3461     3489      +28     
- Misses       5595     5697     +102     
Impacted Files Coverage Δ
src/config.c 42.04% <ø> (ø)
src/config.h 23.52% <ø> (ø)
src/options.c 21.47% <0.00%> (-0.59%) ⬇️
src/render.c 4.24% <0.00%> (-0.64%) ⬇️
src/win.c 68.82% <38.46%> (-0.29%) ⬇️
src/picom.c 68.45% <75.00%> (+0.05%) ⬆️
src/config_libconfig.c 57.98% <100.00%> (+0.25%) ⬆️
src/win.h 78.12% <100.00%> (+28.12%) ⬆️

@yshui yshui force-pushed the rounded-corners-legacy-xrender branch from 4bd612d to c523745 Compare November 29, 2020 21:58
@yshui yshui requested a review from tryone144 November 29, 2020 22:05
@yshui
Copy link
Owner Author

yshui commented Nov 29, 2020

I think this change is pretty isolated, doesn't have much impact outside the legacy backends.

Copy link
Collaborator

@tryone144 tryone144 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

full-shadow is broken with corner-radius > 0.
For performance reasons it might be preferable to cache the rounded window mask, but I guess this might not be justifiable for the legacy backends.

src/config.c Show resolved Hide resolved
src/options.c Outdated Show resolved Hide resolved
picom.sample.conf Show resolved Hide resolved
Comment on lines +297 to +296
xcb_render_color_t black = {
.red = 255, .blue = 255, .green = 255, .alpha = 255};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this actually white? Or am I missing something? Should matter though as long as it works.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this is white. maybe it's named black because we do a OP_OUT_REVERSE later, so it's inverted? I can only guess.

src/render.c Outdated Show resolved Hide resolved
src/render.c Outdated Show resolved Hide resolved
sdhand and others added 5 commits November 30, 2020 00:31
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Authored-by: Samuel Hand <samuel.d.hand@gmail.com>
Allows the user to selectively disable rounded corners.

Authored-by: Samuel Hand <samuel.d.hand@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
@yshui yshui force-pushed the rounded-corners-legacy-xrender branch from 2689c9a to cb41ea9 Compare November 30, 2020 00:35
Copy link
Collaborator

@tryone144 tryone144 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although I couldn't test this with other window managers.

@yshui
Copy link
Owner Author

yshui commented Nov 30, 2020

@tryone144 Thanks.

@yshui yshui merged commit c634641 into next Nov 30, 2020
@yshui yshui deleted the rounded-corners-legacy-xrender branch November 30, 2020 01:08
@tryone144 tryone144 mentioned this pull request Jul 17, 2021
This pull request was closed.
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