Skip to content

Commit

Permalink
Only show multi-e10s setting for debug builds (#3153)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemarvin committed Apr 16, 2020
1 parent 8ae349f commit c20caf2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Expand Up @@ -8,6 +8,7 @@
import androidx.annotation.Nullable;

import org.mozilla.gecko.GeckoProfile;
import org.mozilla.vrbrowser.BuildConfig;
import org.mozilla.vrbrowser.browser.SettingsStore;
import org.mozilla.vrbrowser.utils.SystemUtils;

Expand Down Expand Up @@ -43,8 +44,10 @@ public static void vrPrefsWorkAround(Context aContext, Bundle aExtras) {
// Disable WebRender until it works with FxR
out.write("pref(\"gfx.webrender.force-disabled\", true);\n".getBytes());
out.write("pref(\"signon.rememberSignons\", false);\n".getBytes());
int processCount = SettingsStore.getInstance(aContext).isMultiE10s() ? 3 : 1;
out.write(("pref(\"dom.ipc.processCount\", " + processCount + ");\n").getBytes());
if (BuildConfig.DEBUG) {
int processCount = SettingsStore.getInstance(aContext).isMultiE10s() ? 3 : 1;
out.write(("pref(\"dom.ipc.processCount\", " + processCount + ");\n").getBytes());
}
int msaa = SettingsStore.getInstance(aContext).getMSAALevel();
if (msaa > 0) {
int msaaLevel = msaa == 2 ? 4 : 2;
Expand Down
Expand Up @@ -69,12 +69,13 @@ protected void updateUI() {
mBinding.bypassCacheOnReloadSwitch.setOnCheckedChangeListener(mBypassCacheOnReloadListener);
setBypassCacheOnReload(SettingsStore.getInstance(getContext()).isBypassCacheOnReloadEnabled(), false);

mBinding.multiE10sSwitch.setOnCheckedChangeListener(mMultiE10sListener);
setMultiE10s(SettingsStore.getInstance(getContext()).isMultiE10s(), false);

if (BuildConfig.DEBUG) {
mBinding.debugLoggingSwitch.setVisibility(View.GONE);
mBinding.multiE10sSwitch.setOnCheckedChangeListener(mMultiE10sListener);
setMultiE10s(SettingsStore.getInstance(getContext()).isMultiE10s(), false);
} else {
mBinding.multiE10sSwitch.setVisibility(View.GONE);
mBinding.debugLoggingSwitch.setOnCheckedChangeListener(mDebugLogginListener);
setDebugLogging(SettingsStore.getInstance(getContext()).isDebugLoggingEnabled(), false);
}

Expand Down

0 comments on commit c20caf2

Please sign in to comment.