android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |    1 
 android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java  |   38 
+++-------
 2 files changed, 13 insertions(+), 26 deletions(-)

New commits:
commit 1183c8dc27401ca1854354aeb67f27f96749e144
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Nov 13 11:02:07 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Nov 14 11:56:47 2025 +0100

    android: Drop GeckoLayerClient.mIsReady
    
    Now with
    
        Change-Id: If1ebe5da94d8193794cce41e052bd401e0c8adbc
        Author: Michael Weghorn <[email protected]>
        Date:   Thu Nov 13 10:59:12 2025 +0100
    
            android: Move GeckoLayerClient.notifyReady logic to ctor
    
    in place, the member is already set to true in the ctor,
    so there's no need to check for that anymore.
    
    Change-Id: Idb762da74ed334e9ffb56e709ec92c960bc82113
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193954
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
index 44c53e513a49..47050edaa778 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
@@ -45,8 +45,6 @@ public class GeckoLayerClient implements PanZoomTarget {
 
     private ZoomConstraints mZoomConstraints;
 
-    private boolean mIsReady;
-
     private final PanZoomController mPanZoomController;
     private final LayerView mView;
     private final DisplayPortCalculator mDisplayPortCalculator;
@@ -66,7 +64,6 @@ public class GeckoLayerClient implements PanZoomTarget {
         mView = view;
         mPanZoomController = PanZoomController.Factory.create(mContext, this, 
mView);
         mView.connect(this);
-        mIsReady = true;
 
         mRootLayer = new DynamicTileLayer(mContext);
         mLowResLayer = new FixedZoomTileLayer(mContext);
@@ -80,11 +77,11 @@ public class GeckoLayerClient implements PanZoomTarget {
     }
 
     Layer getRoot() {
-        return mIsReady ? mRootLayer : null;
+        return mRootLayer;
     }
 
     Layer getLowResLayer() {
-        return mIsReady ? mLowResLayer : null;
+        return mLowResLayer;
     }
 
     public LayerView getView() {
@@ -232,14 +229,12 @@ public class GeckoLayerClient implements PanZoomTarget {
     /** Implementation of PanZoomTarget */
     @Override
     public void setAnimationTarget(ImmutableViewportMetrics viewport) {
-        if (mIsReady) {
-            // We know what the final viewport of the animation is going to 
be, so
-            // immediately request a draw of that area by setting the display 
port
-            // accordingly. This way we should have the content pre-rendered 
by the
-            // time the animation is done.
-            DisplayPortMetrics displayPort = 
mDisplayPortCalculator.calculate(viewport, null);
-            adjustViewport(displayPort);
-        }
+        // We know what the final viewport of the animation is going to be, so
+        // immediately request a draw of that area by setting the display port
+        // accordingly. This way we should have the content pre-rendered by the
+        // time the animation is done.
+        DisplayPortMetrics displayPort = 
mDisplayPortCalculator.calculate(viewport, null);
+        adjustViewport(displayPort);
     }
 
     /** Implementation of PanZoomTarget
@@ -249,18 +244,14 @@ public class GeckoLayerClient implements PanZoomTarget {
     public void setViewportMetrics(ImmutableViewportMetrics viewport) {
         mViewportMetrics = viewport;
         mView.requestRender();
-        if (mIsReady) {
-            geometryChanged();
-        }
+        geometryChanged();
     }
 
     /** Implementation of PanZoomTarget */
     @Override
     public void forceRedraw() {
         mForceRedraw = true;
-        if (mIsReady) {
-            geometryChanged();
-        }
+        geometryChanged();
     }
 
     /** Implementation of PanZoomTarget */
commit e0a2dcc0bb9fca7db888edf866df01a5c3cb338d
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Nov 13 10:59:12 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Nov 14 11:56:35 2025 +0100

    android: Move GeckoLayerClient.notifyReady logic to ctor
    
    Instead of calling the method after creating the
    object, move the logic into the ctor itself.
    
    This also allows to make a few more members final.
    
    Change-Id: If1ebe5da94d8193794cce41e052bd401e0c8adbc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193953
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 65f2ff62f2b6..3b8f693b3494 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -153,7 +153,6 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Shared
         LayerView layerView = findViewById(R.id.layer_view);
         mLayerClient = new GeckoLayerClient(this, layerView);
         layerView.setInputConnectionHandler(new LOKitInputConnectionHandler());
-        mLayerClient.notifyReady();
 
         layerView.setOnKeyListener(new View.OnKeyListener() {
             @Override
diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
index 8a00ed5053e9..44c53e513a49 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
@@ -18,14 +18,14 @@ import java.util.List;
 public class GeckoLayerClient implements PanZoomTarget {
     private static final String LOGTAG = 
GeckoLayerClient.class.getSimpleName();
 
-    private LayerRenderer mLayerRenderer;
+    private final LayerRenderer mLayerRenderer;
 
     private final LibreOfficeMainActivity mContext;
     private IntSize mScreenSize;
     private DisplayPortMetrics mDisplayPort;
 
-    private ComposedTileLayer mLowResLayer;
-    private ComposedTileLayer mRootLayer;
+    private final ComposedTileLayer mLowResLayer;
+    private final ComposedTileLayer mRootLayer;
 
     private boolean mForceRedraw;
 
@@ -66,9 +66,6 @@ public class GeckoLayerClient implements PanZoomTarget {
         mView = view;
         mPanZoomController = PanZoomController.Factory.create(mContext, this, 
mView);
         mView.connect(this);
-    }
-
-    public void notifyReady() {
         mIsReady = true;
 
         mRootLayer = new DynamicTileLayer(mContext);

Reply via email to