mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +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
|
#endif
|
||||||
|
|
||||||
QByteArray flags = qgetenv("QTWEBENGINE_CHROMIUM_FLAGS");
|
QByteArray chromium_flags = qgetenv("QTWEBENGINE_CHROMIUM_FLAGS");
|
||||||
flags.append(" --enable-features=WebRTCPipeWireCapturer");
|
chromium_flags.append(" --enable-features=WebRTCPipeWireCapturer");
|
||||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", flags);
|
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", chromium_flags);
|
||||||
|
|
||||||
QUrl startUrl;
|
QUrl startUrl;
|
||||||
QString startProfile;
|
QString startProfile;
|
||||||
|
@ -287,6 +287,10 @@ MainApplication::MainApplication(int &argc, char** argv)
|
||||||
profileManager.initCurrentProfile(startProfile);
|
profileManager.initCurrentProfile(startProfile);
|
||||||
|
|
||||||
Settings::createSettings(DataPaths::currentProfilePath() + QLatin1String("/settings.ini"));
|
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();
|
NetworkManager::registerSchemes();
|
||||||
|
|
||||||
|
|
|
@ -291,6 +291,7 @@ Preferences::Preferences(BrowserWindow* window)
|
||||||
ui->intPDFViewer->setChecked(settings.value("intPDFViewer", false).toBool());
|
ui->intPDFViewer->setChecked(settings.value("intPDFViewer", false).toBool());
|
||||||
ui->intPDFViewer->setEnabled(ui->allowPlugins->isChecked());
|
ui->intPDFViewer->setEnabled(ui->allowPlugins->isChecked());
|
||||||
ui->screenCaptureEnabled->setChecked(settings.value("screenCaptureEnabled", false).toBool());
|
ui->screenCaptureEnabled->setChecked(settings.value("screenCaptureEnabled", false).toBool());
|
||||||
|
ui->hardwareAccel->setChecked(settings.value("hardwareAccel", false).toBool());
|
||||||
|
|
||||||
const auto levels = WebView::zoomLevels();
|
const auto levels = WebView::zoomLevels();
|
||||||
for (int level : levels) {
|
for (int level : levels) {
|
||||||
|
@ -967,7 +968,7 @@ void Preferences::saveSettings()
|
||||||
settings.setValue("DNSPrefetch", ui->dnsPrefetch->isChecked());
|
settings.setValue("DNSPrefetch", ui->dnsPrefetch->isChecked());
|
||||||
settings.setValue("intPDFViewer", ui->intPDFViewer->isChecked());
|
settings.setValue("intPDFViewer", ui->intPDFViewer->isChecked());
|
||||||
settings.setValue("screenCaptureEnabled", ui->screenCaptureEnabled->isChecked());
|
settings.setValue("screenCaptureEnabled", ui->screenCaptureEnabled->isChecked());
|
||||||
|
settings.setValue("hardwareAccel", ui->hardwareAccel->isChecked());
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
settings.setValue("CheckDefaultBrowser", ui->checkDefaultBrowser->isChecked());
|
settings.setValue("CheckDefaultBrowser", ui->checkDefaultBrowser->isChecked());
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1096,6 +1096,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="hardwareAccel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use hardware acceleration (requires restart)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user