mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 15:25:58 +01:00
optimize xwayland has_alpha blur
This commit is contained in:
parent
cb1a36faf0
commit
c9c4b14ef2
1 changed files with 7 additions and 3 deletions
|
@ -36,11 +36,15 @@ void renderSurface(struct wlr_surface* surface, int x, int y, void* data) {
|
||||||
float rounding = RDATA->dontRound ? 0 : RDATA->rounding == -1 ? *PROUNDING : RDATA->rounding;
|
float rounding = RDATA->dontRound ? 0 : RDATA->rounding == -1 ? *PROUNDING : RDATA->rounding;
|
||||||
|
|
||||||
if (RDATA->surface && surface == RDATA->surface) {
|
if (RDATA->surface && surface == RDATA->surface) {
|
||||||
|
if (wlr_surface_is_xwayland_surface(surface) && !wlr_xwayland_surface_from_wlr_surface(surface)->has_alpha) {
|
||||||
|
g_pHyprOpenGL->renderTexture(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, rounding, true);
|
||||||
|
} else {
|
||||||
if (RDATA->blur)
|
if (RDATA->blur)
|
||||||
g_pHyprOpenGL->renderTextureWithBlur(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, surface, rounding);
|
g_pHyprOpenGL->renderTextureWithBlur(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, surface, rounding);
|
||||||
else
|
else
|
||||||
g_pHyprOpenGL->renderTexture(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, rounding, true);
|
g_pHyprOpenGL->renderTexture(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, rounding, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (RDATA->surface && wlr_surface_is_xdg_surface(RDATA->surface)) {
|
if (RDATA->surface && wlr_surface_is_xdg_surface(RDATA->surface)) {
|
||||||
wlr_box geo;
|
wlr_box geo;
|
||||||
|
|
Loading…
Reference in a new issue