mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-19 18:26:34 +01:00
Options to turn on hardware acceleration
This commit is contained in:
parent
c18fea707a
commit
9c1f946bad
@ -148,9 +148,9 @@ MainApplication::MainApplication(int &argc, char** argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
QByteArray flags = qgetenv("QTWEBENGINE_CHROMIUM_FLAGS");
|
||||
flags.append(" --enable-features=WebRTCPipeWireCapturer");
|
||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", flags);
|
||||
QByteArray chromium_flags = qgetenv("QTWEBENGINE_CHROMIUM_FLAGS");
|
||||
chromium_flags.append(" --enable-features=WebRTCPipeWireCapturer");
|
||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", chromium_flags);
|
||||
|
||||
QUrl startUrl;
|
||||
QString startProfile;
|
||||
@ -287,6 +287,10 @@ MainApplication::MainApplication(int &argc, char** argv)
|
||||
profileManager.initCurrentProfile(startProfile);
|
||||
|
||||
Settings::createSettings(DataPaths::currentProfilePath() + QLatin1String("/settings.ini"));
|
||||
if (Settings::globalSettings()->value("Web-Browser-Settings/hardwareAccel", false).toBool()) {
|
||||
chromium_flags.append(" --enable-oop-rasterization --enable-gpu-rasterization --enable-native-gpu-memory-buffers --use-gl=desktop");
|
||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", chromium_flags);
|
||||
}
|
||||
|
||||
NetworkManager::registerSchemes();
|
||||
|
||||
|
@ -291,6 +291,7 @@ Preferences::Preferences(BrowserWindow* window)
|
||||
ui->intPDFViewer->setChecked(settings.value("intPDFViewer", false).toBool());
|
||||
ui->intPDFViewer->setEnabled(ui->allowPlugins->isChecked());
|
||||
ui->screenCaptureEnabled->setChecked(settings.value("screenCaptureEnabled", false).toBool());
|
||||
ui->hardwareAccel->setChecked(settings.value("hardwareAccel", false).toBool());
|
||||
|
||||
const auto levels = WebView::zoomLevels();
|
||||
for (int level : levels) {
|
||||
@ -967,7 +968,7 @@ void Preferences::saveSettings()
|
||||
settings.setValue("DNSPrefetch", ui->dnsPrefetch->isChecked());
|
||||
settings.setValue("intPDFViewer", ui->intPDFViewer->isChecked());
|
||||
settings.setValue("screenCaptureEnabled", ui->screenCaptureEnabled->isChecked());
|
||||
|
||||
settings.setValue("hardwareAccel", ui->hardwareAccel->isChecked());
|
||||
#ifdef Q_OS_WIN
|
||||
settings.setValue("CheckDefaultBrowser", ui->checkDefaultBrowser->isChecked());
|
||||
#endif
|
||||
|
@ -1096,6 +1096,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="hardwareAccel">
|
||||
<property name="text">
|
||||
<string>Use hardware acceleration (requires restart)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
|
Loading…
Reference in New Issue
Block a user