commit:     42fc992a382bf65caf16f26759f71fc9909408ed
Author:     Adel KARA SLIMANE <adel.ks <AT> zegrapher <DOT> com>
AuthorDate: Sun Jan 14 18:31:12 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 14 20:26:30 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42fc992a

app-editors/vscode: add EGL useflag for smooth rendering

Rendering on vscode is limited to 60fps by default.
This useflag makes vscode match the monitor's refresh rate,
at least on x11/xwayland. In my testing, it did not change anything
on wayland with wayland mode.

See https://github.com/microsoft/vscode/issues/65142

Signed-off-by: Adel KARA SLIMANE <adel.ks <AT> zegrapher.com>
Closes: https://github.com/gentoo/gentoo/pull/34805
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 app-editors/vscode/metadata.xml                                      | 1 +
 .../vscode/{vscode-1.85.0-r1.ebuild => vscode-1.85.0-r2.ebuild}      | 5 ++++-
 .../vscode/{vscode-1.85.1-r1.ebuild => vscode-1.85.1-r2.ebuild}      | 5 ++++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/app-editors/vscode/metadata.xml b/app-editors/vscode/metadata.xml
index 177d32d281e8..52921d6c9411 100644
--- a/app-editors/vscode/metadata.xml
+++ b/app-editors/vscode/metadata.xml
@@ -14,6 +14,7 @@
                <name>Proxy Maintainers</name>
        </maintainer>
        <use>
+               <flag name="egl">Use EGL platform, enables smooth rending in 
high refresh rate monitors on X11/Xwayland</flag>
                <flag name="wayland">Run in wayland mode under wayland 
sessions, xwayland otherwise. This flag doesn't affect x11 sessions.</flag>
        </use>
        <longdescription>

diff --git a/app-editors/vscode/vscode-1.85.0-r1.ebuild 
b/app-editors/vscode/vscode-1.85.0-r2.ebuild
similarity index 96%
rename from app-editors/vscode/vscode-1.85.0-r1.ebuild
rename to app-editors/vscode/vscode-1.85.0-r2.ebuild
index e41624cd8829..5f6d62e913de 100644
--- a/app-editors/vscode/vscode-1.85.0-r1.ebuild
+++ b/app-editors/vscode/vscode-1.85.0-r2.ebuild
@@ -35,7 +35,7 @@ LICENSE="
 "
 SLOT="0"
 KEYWORDS="-* amd64 ~arm ~arm64"
-IUSE="kerberos wayland"
+IUSE="egl kerberos wayland"
 RESTRICT="mirror strip bindist"
 
 RDEPEND="
@@ -109,6 +109,9 @@ src_install() {
        if use wayland; then
                EXEC_EXTRA_FLAGS+=( "--ozone-platform-hint=auto" )
        fi
+       if use egl; then
+               EXEC_EXTRA_FLAGS+=( "--use-gl=egl" )
+       fi
 
        sed "s|@exec_extra_flags@|${EXEC_EXTRA_FLAGS[*]}|g" \
                "${FILESDIR}/vscode-url-handler.desktop" \

diff --git a/app-editors/vscode/vscode-1.85.1-r1.ebuild 
b/app-editors/vscode/vscode-1.85.1-r2.ebuild
similarity index 96%
rename from app-editors/vscode/vscode-1.85.1-r1.ebuild
rename to app-editors/vscode/vscode-1.85.1-r2.ebuild
index e41624cd8829..5f6d62e913de 100644
--- a/app-editors/vscode/vscode-1.85.1-r1.ebuild
+++ b/app-editors/vscode/vscode-1.85.1-r2.ebuild
@@ -35,7 +35,7 @@ LICENSE="
 "
 SLOT="0"
 KEYWORDS="-* amd64 ~arm ~arm64"
-IUSE="kerberos wayland"
+IUSE="egl kerberos wayland"
 RESTRICT="mirror strip bindist"
 
 RDEPEND="
@@ -109,6 +109,9 @@ src_install() {
        if use wayland; then
                EXEC_EXTRA_FLAGS+=( "--ozone-platform-hint=auto" )
        fi
+       if use egl; then
+               EXEC_EXTRA_FLAGS+=( "--use-gl=egl" )
+       fi
 
        sed "s|@exec_extra_flags@|${EXEC_EXTRA_FLAGS[*]}|g" \
                "${FILESDIR}/vscode-url-handler.desktop" \

Reply via email to