android/source/src/java/org/mozilla/gecko/gfx/DisplayPortCalculator.java | 52 ---------- 1 file changed, 52 deletions(-)
New commits: commit 8e5bd21b82af846a1e22cb4a0606ec890b45ffe3 Author: Michael Weghorn <[email protected]> AuthorDate: Tue Nov 11 14:38:20 2025 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Wed Nov 12 01:43:12 2025 +0100 android: Drop unused DisplayPortCalculator.setStrategy Change-Id: I8e7154837ac928f6940cf8a96c507e9aab59fe7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193809 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/android/source/src/java/org/mozilla/gecko/gfx/DisplayPortCalculator.java b/android/source/src/java/org/mozilla/gecko/gfx/DisplayPortCalculator.java index 2e5b785452d6..ca55d5a6b507 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/DisplayPortCalculator.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/DisplayPortCalculator.java @@ -22,7 +22,6 @@ final class DisplayPortCalculator { // Keep this in sync with the TILEDLAYERBUFFER_TILE_SIZE defined in gfx/layers/TiledLayerBuffer.h private static final int TILE_SIZE = 256; - private static final String PREF_DISPLAYPORT_STRATEGY = "gfx.displayport.strategy"; private static final String PREF_DISPLAYPORT_FM_MULTIPLIER = "gfx.displayport.strategy_fm.multiplier"; private static final String PREF_DISPLAYPORT_FM_DANGER_X = "gfx.displayport.strategy_fm.danger_x"; private static final String PREF_DISPLAYPORT_FM_DANGER_Y = "gfx.displayport.strategy_fm.danger_y"; @@ -62,41 +61,6 @@ final class DisplayPortCalculator { sStrategy.resetPageState(); } - /** - * Set the active strategy to use. - * See the gfx.displayport.strategy pref in mobile/android/app/mobile.js to see the - * mapping between ints and strategies. - */ - boolean setStrategy(Map<String, Integer> prefs) { - Integer strategy = prefs.get(PREF_DISPLAYPORT_STRATEGY); - if (strategy == null) { - return false; - } - - switch (strategy) { - case 0: - sStrategy = new FixedMarginStrategy(prefs); - break; - case 1: - sStrategy = new VelocityBiasStrategy(mMainActivity, prefs); - break; - case 2: - sStrategy = new DynamicResolutionStrategy(mMainActivity, prefs); - break; - case 3: - sStrategy = new NoMarginStrategy(prefs); - break; - case 4: - sStrategy = new PredictionBiasStrategy(mMainActivity, prefs); - break; - default: - Log.e(LOGTAG, "Invalid strategy index specified"); - return false; - } - Log.i(LOGTAG, "Set strategy " + sStrategy.toString()); - return true; - } - private static float getFloatPref(Map<String, Integer> prefs, String prefName, int defaultValue) { Integer value = (prefs == null ? null : prefs.get(prefName)); return (float)(value == null || value < 0 ? defaultValue : value) / 1000f; commit 6ef8c528c0384cbac0b16c29499306b8c18c82e5 Author: Michael Weghorn <[email protected]> AuthorDate: Tue Nov 11 14:34:43 2025 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Wed Nov 12 01:43:00 2025 +0100 android: Drop unused DisplayPortCalculator.addPrefNames Change-Id: I604cc571c6888568d3f7f248c9b23147e69930e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193808 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/android/source/src/java/org/mozilla/gecko/gfx/DisplayPortCalculator.java b/android/source/src/java/org/mozilla/gecko/gfx/DisplayPortCalculator.java index d98efa2d50f8..2e5b785452d6 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/DisplayPortCalculator.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/DisplayPortCalculator.java @@ -9,7 +9,6 @@ import android.graphics.PointF; import android.graphics.RectF; import android.util.Log; -import org.json.JSONArray; import org.libreoffice.LOKitShell; import org.libreoffice.LibreOfficeMainActivity; import org.mozilla.gecko.util.FloatUtils; @@ -63,21 +62,6 @@ final class DisplayPortCalculator { sStrategy.resetPageState(); } - static void addPrefNames(JSONArray prefs) { - prefs.put(PREF_DISPLAYPORT_STRATEGY); - prefs.put(PREF_DISPLAYPORT_FM_MULTIPLIER); - prefs.put(PREF_DISPLAYPORT_FM_DANGER_X); - prefs.put(PREF_DISPLAYPORT_FM_DANGER_Y); - prefs.put(PREF_DISPLAYPORT_VB_MULTIPLIER); - prefs.put(PREF_DISPLAYPORT_VB_VELOCITY_THRESHOLD); - prefs.put(PREF_DISPLAYPORT_VB_REVERSE_BUFFER); - prefs.put(PREF_DISPLAYPORT_VB_DANGER_X_BASE); - prefs.put(PREF_DISPLAYPORT_VB_DANGER_Y_BASE); - prefs.put(PREF_DISPLAYPORT_VB_DANGER_X_INCR); - prefs.put(PREF_DISPLAYPORT_VB_DANGER_Y_INCR); - prefs.put(PREF_DISPLAYPORT_PB_VELOCITY_THRESHOLD); - } - /** * Set the active strategy to use. * See the gfx.displayport.strategy pref in mobile/android/app/mobile.js to see the
