android/source/src/java/org/mozilla/gecko/gfx/GLController.java |   17 --------
 android/source/src/java/org/mozilla/gecko/gfx/LayerView.java    |   21 
----------
 2 files changed, 38 deletions(-)

New commits:
commit d088e3cfc582beeabb26257f689c7e4e83e7e731
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Nov 8 15:27:48 2023 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Nov 9 07:54:16 2023 +0100

    android: Drop unused LayerView#{g,s}etPaintState
    
    ... and the now also unused `mPaintState` member and
    related constants.
    
    Change-Id: Iefd40ca4a72d32807b136830833e88e250f8f38b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159161
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java 
b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
index 955bcde316f9..5429d09cbb1d 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -47,8 +47,6 @@ public class LayerView extends FrameLayout {
     private InputConnectionHandler mInputConnectionHandler;
     private LayerRenderer mRenderer;
 
-    /* Must be a PAINT_xxx constant */
-    private int mPaintState = PAINT_NONE;
     private boolean mFullScreen = false;
 
     private SurfaceView mSurfaceView;
@@ -58,12 +56,6 @@ public class LayerView extends FrameLayout {
     //TODO static because of registerCxxCompositor() function, should be fixed 
in the future
     private static LibreOfficeMainActivity mContext;
 
-    /* Flags used to determine when to show the painted surface. The integer
-     * order must correspond to the order in which these states occur. */
-    public static final int PAINT_NONE = 0;
-    public static final int PAINT_BEFORE_FIRST = 1;
-    public static final int PAINT_AFTER_FIRST = 2;
-
     public LayerView(Context context, AttributeSet attrs) {
         super(context, attrs);
         mContext = (LibreOfficeMainActivity) context;
@@ -217,19 +209,6 @@ public class LayerView extends FrameLayout {
         return mRenderer;
     }
 
-    /* paintState must be a PAINT_xxx constant. The state will only be changed
-     * if paintState represents a state that occurs after the current state. */
-    public void setPaintState(int paintState) {
-        if (paintState > mPaintState) {
-            Log.d(LOGTAG, "LayerView paint state set to " + paintState);
-            mPaintState = paintState;
-        }
-    }
-
-    public int getPaintState() {
-        return mPaintState;
-    }
-
     public LayerRenderer getRenderer() {
         return mRenderer;
     }
commit 0a5bf928d936443bf1ff84118a9790a9b334801c
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Nov 8 15:19:48 2023 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Nov 9 07:54:08 2023 +0100

    android: Drop unused GLController#waitForValidSurface
    
    The method is unused, so drop it, and also the now never
    read `mSurfaceValid` member.
    
    Likely, the comment that the method is invoked via JNI
    was never valid for LibreOffice Viewer, but is from Gecko/Fennec
    days, similar to the case in the previous commit,
    
        Change-Id I54dd33a2ce30ebdc375a7c1fefacca6e99d2f571
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Wed Nov 8 15:10:19 2023 +0100
    
            android: Drop unused GLController#resumeCompositorIfValid etc.
    
    Change-Id: I165d2c7ebf5b9ce940b608d738d9a10d5bef69ea
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159160
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
index 76af0e78fc4d..2c503ab8b302 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
@@ -20,7 +20,6 @@ public class GLController {
 
     private LayerView mView;
     private int mGLVersion;
-    private boolean mSurfaceValid;
     private int mWidth, mHeight;
 
     private EGL10 mEGL;
@@ -45,7 +44,6 @@ public class GLController {
     public GLController(LayerView view) {
         mView = view;
         mGLVersion = 2;
-        mSurfaceValid = false;
     }
 
     public void setGLVersion(int version) {
@@ -116,19 +114,6 @@ public class GLController {
         mGL = null;
         return true;
     }
-
-    // Wait until we are allowed to use EGL functions on the Surface backing
-    // this window. This function is invoked by JNI
-    public synchronized void waitForValidSurface() {
-        while (!mSurfaceValid) {
-            try {
-                wait();
-            } catch (InterruptedException e) {
-                throw new RuntimeException(e);
-            }
-        }
-    }
-
     public synchronized int getWidth() {
         return mWidth;
     }
@@ -138,14 +123,12 @@ public class GLController {
     }
 
     synchronized void surfaceDestroyed() {
-        mSurfaceValid = false;
         notifyAll();
     }
 
     synchronized void surfaceChanged(int newWidth, int newHeight) {
         mWidth = newWidth;
         mHeight = newHeight;
-        mSurfaceValid = true;
         notifyAll();
     }
 

Reply via email to