[Libreoffice-commits] core.git: 2 commits - android/experimental
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Fri Dec 19 00:53:40 PST 2014
android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java | 14 --------
android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerRenderer.java | 16 +---------
android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java | 11 ++----
3 files changed, 7 insertions(+), 34 deletions(-)
New commits:
commit 3860bff1013f9608b934c4cdb9ddb8d2dbbc3e52
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Fri Dec 19 16:25:23 2014 +0900
android: never use TextureView for now (for performance reasons)
Get align with latest Fennec code which also has this disabled.
Change-Id: Ie4c27935bacd29218207e47593f073bdce0cf7e3
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java
index db5c110..b59bba8 100644
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -40,7 +40,7 @@ import java.nio.IntBuffer;
* Note that LayerView is accessed by Robocop via reflection.
*/
public class LayerView extends FrameLayout {
- private static String LOGTAG = "GeckoLayerView";
+ private static String LOGTAG = LayerView.class.getName();
private GeckoLayerClient mLayerClient;
private TouchEventHandler mTouchEventHandler;
@@ -65,7 +65,7 @@ public class LayerView extends FrameLayout {
boolean shouldUseTextureView() {
// we can only use TextureView on ICS or higher
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+ /*if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
Log.i(LOGTAG, "Not using TextureView: not on ICS+");
return false;
}
@@ -77,7 +77,8 @@ public class LayerView extends FrameLayout {
} catch (Exception e) {
Log.i(LOGTAG, "Not using TextureView: caught exception checking for hw accel: " + e.toString());
return false;
- }
+ }*/
+ return false;
}
public LayerView(Context context, AttributeSet attrs) {
commit 96a498b44c0a0ca48ac9938d9414191850d47d18
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Fri Dec 19 16:24:02 2014 +0900
android: remove screenshot layer
Change-Id: Ic2f0344bab4280fd3c55923707d100f87585199a
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
index faa7d4e..c3535e5 100644
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
+++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
@@ -78,7 +78,6 @@ public class GeckoLayerClient implements PanZoomTarget, LayerView.Listener {
/* The new color for the checkerboard. */
private int mCheckerboardColor;
- private boolean mCheckerboardShouldShowChecks;
private final PanZoomController mPanZoomController;
private LayerView mView;
@@ -98,7 +97,6 @@ public class GeckoLayerClient implements PanZoomTarget, LayerView.Listener {
mViewportMetrics = new ImmutableViewportMetrics(displayMetrics);
mZoomConstraints = new ZoomConstraints(false);
mCheckerboardColor = Color.WHITE;
- mCheckerboardShouldShowChecks = true;
mPanZoomController = PanZoomController.Factory.create(this);
}
@@ -249,10 +247,6 @@ public class GeckoLayerClient implements PanZoomTarget, LayerView.Listener {
}
}
- boolean checkerboardShouldShowChecks() {
- return mCheckerboardShouldShowChecks;
- }
-
int getCheckerboardColor() {
return mCheckerboardColor;
}
@@ -454,14 +448,6 @@ public class GeckoLayerClient implements PanZoomTarget, LayerView.Listener {
return layerPoint;
}
- /**
- * Sets whether or not the checkerboard should show checkmarks.
- */
- public void setCheckerboardShowChecks(boolean showChecks) {
- mCheckerboardShouldShowChecks = showChecks;
- mView.requestRender();
- }
-
public ImmutableViewportMetrics getGeckoViewportMetrics() {
return mGeckoViewport;
}
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerRenderer.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
index 64d3a5d..7b4ead3 100644
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
+++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerRenderer.java
@@ -593,20 +593,10 @@ public class LayerRenderer implements GLSurfaceView.Renderer {
if (!untransformedPageRect.contains(mFrameMetrics.getViewport()))
mShadowLayer.draw(mPageContext);
- /* Draw the 'checkerboard'. We use gfx.show_checkerboard_pattern to
- * determine whether to draw the screenshot layer.
+ /* Scissor around the page-rect, in case the page has shrunk
+ * since the screenshot layer was last updated.
*/
- if (mView.getLayerClient().checkerboardShouldShowChecks()) {
- /* Find the area the root layer will render into, to mask the checkerboard layer */
- Rect rootMask = getMaskForLayer(mView.getLayerClient().getRoot());
- mScreenshotLayer.setMask(rootMask);
-
- /* Scissor around the page-rect, in case the page has shrunk
- * since the screenshot layer was last updated.
- */
- setScissorRect(); // Calls glEnable(GL_SCISSOR_TEST))
- mScreenshotLayer.draw(mPageContext);
- }
+ setScissorRect(); // Calls glEnable(GL_SCISSOR_TEST))
}
// Draws the layer the client added to us.
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java
index 4d23cf4..db5c110 100644
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -418,8 +418,4 @@ public class LayerView extends FrameLayout {
super(e);
}
}
-
- public void changeCheckerboardBitmap(Bitmap bitmap, float pageWidth, float pageHeight) {
- mRenderer.setCheckerboardBitmap(bitmap, pageWidth, pageHeight);
- }
}
More information about the Libreoffice-commits
mailing list