diff options
| author | Eleni Maria Stea <elenimaria.stea@canonical.com> | 2017-01-11 09:23:22 +0200 |
|---|---|---|
| committer | Eleni Maria Stea <elenimaria.stea@canonical.com> | 2017-01-11 09:23:22 +0200 |
| commit | a670f6604cad48d2335fbe33de41c48a33e1156b (patch) | |
| tree | f2aca1bc0d1e1f63ead8970877a01e4e85c60ade /plugins | |
| parent | 5f78f9e8686cc05d01774d4247fbabea48cca6b7 (diff) | |
replaced the lowgfx unityshell plugin option with the lowgfx gsetting
(bzr r4213.3.2)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 34 | ||||
| -rw-r--r-- | plugins/unityshell/unityshell.xml.in | 6 |
2 files changed, 11 insertions, 29 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index beda277ca..91ef4fc7e 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -292,25 +292,22 @@ UnityScreen::UnityScreen(CompScreen* screen) } //In case of software rendering then enable lowgfx mode. - std::string renderer = ANSI_TO_TCHAR(NUX_REINTERPRET_CAST(const char *, glGetString(GL_RENDERER))); g_autoptr(GSettings) gs = g_settings_new("com.canonical.Unity"); - if (g_settings_get_boolean(gs, "lowgfx")) - unity_settings_.low_gfx = true; - else - unity_settings_.low_gfx = false; + bool enable_lowgfx = g_settings_get_boolean(gs, "lowgfx"); + std::string renderer = ANSI_TO_TCHAR(NUX_REINTERPRET_CAST(const char *, glGetString(GL_RENDERER))); if (renderer.find("Software Rasterizer") != std::string::npos || - renderer.find("Mesa X11") != std::string::npos || - renderer.find("llvmpipe") != std::string::npos || - renderer.find("softpipe") != std::string::npos || - (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 1) || - optionGetLowGraphicsMode() - ) - { + renderer.find("Mesa X11") != std::string::npos || + renderer.find("llvmpipe") != std::string::npos || + renderer.find("softpipe") != std::string::npos || + (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 1) || + enable_lowgfx + ) + { unity_settings_.low_gfx = true; - } + } - if (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 0) + if (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 0 && (enable_lowgfx == false)) { unity_settings_.low_gfx = false; } @@ -389,7 +386,6 @@ UnityScreen::UnityScreen(CompScreen* screen) optionSetAutohideAnimationNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); optionSetDashBlurExperimentalNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); optionSetShortcutOverlayNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); - optionSetLowGraphicsModeNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); optionSetShowLauncherInitiate(boost::bind(&UnityScreen::showLauncherKeyInitiate, this, _1, _2, _3)); optionSetShowLauncherTerminate(boost::bind(&UnityScreen::showLauncherKeyTerminate, this, _1, _2, _3)); optionSetKeyboardFocusInitiate(boost::bind(&UnityScreen::setKeyboardFocusKeyInitiate, this, _1, _2, _3)); @@ -3742,14 +3738,6 @@ void UnityScreen::optionChanged(CompOption* opt, UnityshellOptions::Options num) case UnityshellOptions::ShortcutOverlay: shortcut_controller_->SetEnabled(optionGetShortcutOverlay()); break; - case UnityshellOptions::LowGraphicsMode: - if (optionGetLowGraphicsMode()) - BackgroundEffectHelper::blur_type = BLUR_NONE; - else - BackgroundEffectHelper::blur_type = (unity::BlurType)optionGetDashBlurExperimental(); - - unity::Settings::Instance().low_gfx = optionGetLowGraphicsMode(); - break; case UnityshellOptions::DecayRate: launcher_options->edge_decay_rate = optionGetDecayRate() * 100; break; diff --git a/plugins/unityshell/unityshell.xml.in b/plugins/unityshell/unityshell.xml.in index 1820f27d2..9294c5b26 100644 --- a/plugins/unityshell/unityshell.xml.in +++ b/plugins/unityshell/unityshell.xml.in @@ -160,12 +160,6 @@ <_long>Enables possibility to display an overlay showing available mouse and keyboard shortcuts.</_long> <default>true</default> </option> - - <option name="low_graphics_mode" type="bool"> - <_short>Enable Low Graphics Mode</_short> - <_long>Enables low graphics mode regardless of hardware in the system</_long> - <default>false</default> - </option> </group> <group> |
