[Libreoffice-commits] core.git: Branch 'feature/tiledrendering' - 2 commits - sw/source
Tor Lillqvist
tml at collabora.com
Sun Nov 3 21:59:39 CET 2013
sw/source/core/view/viewsh.cxx | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
New commits:
commit 51c0b80139c1fa05ca34a629073eeecb2ab1a766
Author: Tor Lillqvist <tml at collabora.com>
Date: Sun Nov 3 22:46:38 2013 +0200
Make the scaling with the "tile/context" ratio optional, too
It just confuses things, for me at least... It's enough to keep the
scaling from our "decitwips" to twips to pixels in your head.
I am now finally starting to understand what is going on;)
Change-Id: I0dca2722105914de41d1ce017410cb5a05cf32c4
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 6a5bda0..ac88413 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1805,11 +1805,15 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
MapMode aMapMode(aDevice.GetMapMode());
aMapMode.SetMapUnit(MAP_TWIP);
aMapMode.SetOrigin(Point(-tilePosX, -tilePosY));
- // scaling
- Fraction scaleX(tileWidth,contextWidth);
- Fraction scaleY(tileHeight,contextHeight);
- aMapMode.SetScaleX(scaleX);
- aMapMode.SetScaleY(scaleY);
+ static bool bCallSetScale = getenv("CALLSETSCALE") != NULL;
+ if (bCallSetScale)
+ {
+ // scaling
+ Fraction scaleX(tileWidth,contextWidth);
+ Fraction scaleY(tileHeight,contextHeight);
+ aMapMode.SetScaleX(scaleX);
+ aMapMode.SetScaleY(scaleY);
+ }
aDevice.SetMapMode(aMapMode);
static bool bCallSetSwVisArea = getenv("CALLSETSWVISAREA") != NULL;
if (bCallSetSwVisArea)
commit 04b991a1628154c10d7216d84a8838b093a2884f
Author: Tor Lillqvist <tml at collabora.com>
Date: Sun Nov 3 22:31:15 2013 +0200
Use SAL_INFO() instead of commented-out SAL_DEBUG() for now
Less hassle when committing, as even a commented-out SAL_DEBUG()
triggers the commit hook to complain.
Change-Id: I8cab87f204622624602fde3543630f073a558069
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 06f33f9..6a5bda0 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1775,7 +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 << ")");
+ SAL_INFO("sw", "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;
@@ -1814,11 +1814,11 @@ void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLOD
static bool bCallSetSwVisArea = getenv("CALLSETSWVISAREA") != NULL;
if (bCallSetSwVisArea)
{
- // SwRect foo = pViewShell->VisArea();
- // SAL_DEBUG("old VisArea: " << foo);
+ SwRect foo = pViewShell->VisArea();
+ SAL_INFO("sw", "old VisArea: " << foo);
SetSwVisArea( pViewShell, SwRect(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)) );
- // foo = pViewShell->VisArea();
- // SAL_DEBUG("new VisArea: " << foo);
+ foo = pViewShell->VisArea();
+ SAL_INFO("sw", "new VisArea: " << foo);
}
// resizes the virtual device so to contain the entrie context
aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
More information about the Libreoffice-commits
mailing list