[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental

Tor Lillqvist tml at collabora.com
Tue Oct 21 07:28:19 PDT 2014


 android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java |   12 ++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit f6269d2fdab2599a2059f05da5b99a41bad6f406
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Oct 21 17:27:30 2014 +0300

    Log time since object creation, not since epoch
    
    Change-Id: I43c7725b88c9326e269abc277f42e47c08acefb5

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
index 74ad782..1bc6499 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
@@ -28,6 +28,8 @@ public class LOKitTileProvider implements TileProvider {
     private float mWidthTwip;
     private float mHeightTwip;
 
+    private long objectCreationTime = System.currentTimeMillis();
+
     public LOKitTileProvider(LayerController layerController, String input) {
         mLayerController = layerController;
         mDPI = (float) LOKitShell.getDpi();
@@ -166,11 +168,13 @@ public class LOKitTileProvider implements TileProvider {
             float twipY = pixelToTwip(y, mDPI) / zoom;
             float twipWidth = mTileWidth / zoom;
             float twipHeight = mTileHeight / zoom;
-            long start = System.currentTimeMillis();
-            Log.i(LOGTAG, "paintTile TOP @ " + start + "(" + tileSize.width + " " + tileSize.height + " " + (int) twipX + " " + (int) twipY + " " + (int) twipWidth + " " + (int) twipHeight + ")");
+            long start = System.currentTimeMillis() - objectCreationTime;
+
+            Log.i(LOGTAG, "paintTile >> @" + start + " (" + tileSize.width + " " + tileSize.height + " " + (int) twipX + " " + (int) twipY + " " + (int) twipWidth + " " + (int) twipHeight + ")");
             mDocument.paintTile(buffer, tileSize.width, tileSize.height, (int) twipX, (int) twipY, (int) twipWidth, (int) twipHeight);
-            long stop = System.currentTimeMillis();
-            Log.i(LOGTAG, "paintTile TAIL @ " + stop + " - elapsed: " + (stop - start) + " ");
+
+            long stop = System.currentTimeMillis() - objectCreationTime;
+            Log.i(LOGTAG, "paintTile << @" + stop + " elapsed: " + (stop - start));
         } else {
             Log.e(LOGTAG, "Document is null!!");
         }


More information about the Libreoffice-commits mailing list