summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-11-08 17:20:13 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-11-09 07:55:09 +0100
commit3cedd0780e5777790cdfab9f2b7657187bea1627 (patch)
treee4488e7d97c39edeede7927284575e4bb7f8e8a2 /android
parent61bfc27f0495ab0427453e6d6078c3abe4777f56 (diff)
android: Drop unused LayerRenderer#Frame#getMaskForLayer
Unused since commit 96a498b44c0a0ca48ac9938d9414191850d47d18 Date: Fri Dec 19 16:24:02 2014 +0900 android: remove screenshot layer Change-Id: I3b83596bb854cb4bdfc6281ca487c8be15bc61d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159167 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'android')
-rw-r--r--android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java39
1 files changed, 0 insertions, 39 deletions
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
index 26fbfc79a895..875b3fddd756 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
@@ -380,45 +380,6 @@ public class LayerRenderer implements GLSurfaceView.Renderer {
mUpdated &= layer.update(mPageContext); // called on compositor thread
}
- /** Retrieves the bounds for the layer, rounded in such a way that it
- * can be used as a mask for something that will render underneath it.
- * This will round the bounds inwards, but stretch the mask towards any
- * near page edge, where near is considered to be 'within 2 pixels'.
- * Returns null if the given layer is null.
- */
- private Rect getMaskForLayer(Layer layer) {
- if (layer == null) {
- return null;
- }
-
- RectF bounds = RectUtils.contract(layer.getBounds(mPageContext), 1.0f, 1.0f);
- Rect mask = RectUtils.roundIn(bounds);
-
- // If the mask is within two pixels of any page edge, stretch it over
- // that edge. This is to avoid drawing thin slivers when masking
- // layers.
- if (mask.top <= 2) {
- mask.top = -1;
- }
- if (mask.left <= 2) {
- mask.left = -1;
- }
-
- // Because we're drawing relative to the page-rect, we only need to
- // take into account its width and height (and not its origin)
- int pageRight = mPageRect.width();
- int pageBottom = mPageRect.height();
-
- if (mask.right >= pageRight - 2) {
- mask.right = pageRight + 1;
- }
- if (mask.bottom >= pageBottom - 2) {
- mask.bottom = pageBottom + 1;
- }
-
- return mask;
- }
-
public void drawBackground() {
GLES20.glDisable(GLES20.GL_SCISSOR_TEST);