[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - 2 commits - ios/shared sw/source

Tor Lillqvist tml at collabora.com
Sun Nov 3 20:53:26 CET 2013


 ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m                              |    6 ++++-
 ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h |   12 +++++-----
 sw/source/core/view/viewsh.cxx                                                                              |   11 ++++++++-
 3 files changed, 21 insertions(+), 8 deletions(-)

New commits:
commit eddc596ce5076d48fa8a8e7fc10d0c9184a21358
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Nov 3 21:41:21 2013 +0200

    It seems that calling SetSwVisArea() has no effect
    
    Make it optional at run-time (for now while testing) with an
    environment variable.
    
    Change-Id: I2ba1673fc51e91d0943148a0bf41351c87f272e5

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 67d7974..06f33f9 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1775,6 +1775,7 @@ void ViewShell::PaintTile(OutputDevice *pOut, const Rectangle &rRect)
 extern "C"
 void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLODpxPoint tileDpxPosition, MLODpxSize tileDpxSize)
 {
+    // SAL_DEBUG("touch_lo_draw_tile(" << contextWidth << ", " << contextHeight << ", (" << tileDpxPosition.x << "," << tileDpxPosition.y << "), " << tileDpxSize.width << "x" << tileDpxSize.height << ")");
     MLORipPoint tileRipPosition = MLORipPointByDpxPoint(tileDpxPosition);
     MLORipSize rileRipSize = MLORipSizeByDpxSize(tileDpxSize);
     MLORip tileRipPosX = tileRipPosition.x;
@@ -1810,7 +1811,15 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
         aMapMode.SetScaleX(scaleX);
         aMapMode.SetScaleY(scaleY);
         aDevice.SetMapMode(aMapMode);
-        SetSwVisArea( pViewShell, SwRect(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)) );
+        static bool bCallSetSwVisArea = getenv("CALLSETSWVISAREA") != NULL;
+        if (bCallSetSwVisArea)
+        {
+            // SwRect foo = pViewShell->VisArea();
+            // SAL_DEBUG("old VisArea: " << foo);
+            SetSwVisArea( pViewShell, SwRect(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)) );
+            // foo = pViewShell->VisArea();
+            // SAL_DEBUG("new VisArea: " << foo);
+        }
         // resizes the virtual device so to contain the entrie context
         aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
         // draw - works in logic coordinates
commit 02e1f4298d1109fc8271aa7ac3da73310c4ff59b
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Nov 3 20:39:49 2013 +0200

    Tweak default values of tunables and use larger default step size
    
    It is more interesting to get smaller text in the initial tile. Also,
    make the tile fit on the screen of an iPad.
    
    Change-Id: Ibe4e7f055ec2782a4fd96a3ae585d4630449f0ee

diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
index 779b84d..f43dfb8 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/MLOTestingTileParameter.m
@@ -21,7 +21,7 @@
 @property UIStepper * stepStepper;
 @end
 
-static const CGFloat DEFAULT_STEP_VALUE = 1;
+static const CGFloat DEFAULT_STEP_VALUE = 10;
 
 @implementation MLOTestingTileParameter
 
@@ -36,6 +36,10 @@ static const CGFloat DEFAULT_STEP_VALUE = 1;
         [self initLabel:label];
         self.dataStepper = [self stepperWithMinValue:-MAXFLOAT];
         self.stepStepper = [self stepperWithMinValue:1];
+        // The step stepper obviously needs a step value of 1,
+        // and an initial value of DEFAULT_STEP_VALUE.
+        self.stepStepper.stepValue = 1;
+        self.stepStepper.value = DEFAULT_STEP_VALUE;
         [self initDataTextField];
         [self initStepTextField];
     }
diff --git a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
index ffbf903..3ca92f3 100644
--- a/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
+++ b/ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
@@ -9,12 +9,12 @@
 #import "MLOViewController.h"
 #import "MLOTestingTileSubviewControllerProtocol.h"
 
-static const CGFloat CONTEXT_WIDTH_DEFAULT = 600;
-static const CGFloat CONTEXT_HEIGHT_DEFAULT = 600;
-static const CGFloat TILE_POS_X_DEFAULT = 500;
-static const CGFloat TILE_POS_Y_DEFAULT = 620;
-static const CGFloat TILE_WIDTH_DEFAULT = 1000;
-static const CGFloat TILE_HEIGHT_DEFAULT = 1020;
+static const CGFloat CONTEXT_WIDTH_DEFAULT = 450;
+static const CGFloat CONTEXT_HEIGHT_DEFAULT = 450;
+static const CGFloat TILE_POS_X_DEFAULT = 400;
+static const CGFloat TILE_POS_Y_DEFAULT = 420;
+static const CGFloat TILE_WIDTH_DEFAULT = 250;
+static const CGFloat TILE_HEIGHT_DEFAULT = 250;
 
 @interface MLOTestingTileParametersViewController : MLOViewController<MLOTestingTileSubviewControllerProtocol>
 @property CGFloat contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight;


More information about the Libreoffice-commits mailing list