From 0c48b5633d1eea77685546564f83096529510092 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Fri, 8 Aug 2014 18:15:38 -0400 Subject: [PATCH] Bug 1050797 - Remove some dead code. r=rnewman --- mobile/android/base/gfx/LayerRenderer.java | 49 ---------------------- 1 file changed, 49 deletions(-) diff --git a/mobile/android/base/gfx/LayerRenderer.java b/mobile/android/base/gfx/LayerRenderer.java index 650648fbceb1..975753c64be0 100644 --- a/mobile/android/base/gfx/LayerRenderer.java +++ b/mobile/android/base/gfx/LayerRenderer.java @@ -543,45 +543,6 @@ public class LayerRenderer implements Tabs.OnTabsChangedListener { } } - /** 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; - } - private void clear(int color) { GLES20.glClearColor(((color >> 16) & 0xFF) / 255.0f, ((color >> 8) & 0xFF) / 255.0f, @@ -613,16 +574,6 @@ public class LayerRenderer implements Tabs.OnTabsChangedListener { GLES20.glDisable(GLES20.GL_SCISSOR_TEST); } - // Draws the layer the client added to us. - void drawRootLayer() { - Layer rootLayer = mView.getLayerClient().getRoot(); - if (rootLayer == null) { - return; - } - - rootLayer.draw(mPageContext); - } - @JNITarget public void drawForeground() { // Any GL state which is changed here must be restored in